the underling search used by cq5 is lucene search, think for this we need to make changes in lucene index configuration, don't think cq5 has any specific predicator for the fuzzy searches
The out of the box search component does fuzzy searches. Any ideas on how it does it? It's not using a different search right?
Please see code for OOTB search under
I'm new to CQ5 and I have read that we should not modify anything under /foundation which makes sense. I know how to extend foundation components but I have not seen anything on how to extend the Java classes.
How do I change the behaviour of
Can someone explain or better yet point me to an example/tutorial.
For Java classes you need to create a bundle & export necessary files. It is pretty much covered well in our training material.
I am looking for fuzzy search on users list. I have a page, where i need to provide the user informaiotn (firstName or lastName or emailAddress), based on the input i need to do a fuzzy search.
The out-of-box search is looking for fulltext search itseems. Can we use the same for node search as well with modifications? Can you help me in this, as if we need to do any specific changes to existing code?
I verified FuzzyHashMap, but itseems it is requires effort to fill the hash map before we do the search.
Thanks in advance for your support.
I believe jcr:contains will perform "fuzzy" search.
Have you tried to use jcr:contains(., query) on a subtree where the users information are stored.
I am using jcr Query and writing JCR-SQL2.
Here is my query:
SELECT * FROM [rep:User] AS s WHERE ISDESCENDANTNODE([/home/users]) and contains([emailAddress], "*refuser9*")ORDER BY [firstName].
when i tried to use jcr:contains, its giving syntax errro. I hope jcr:contains is not for JCR-SQL2.
This search is doing full-text search but not suzzy search it seems.
Correct me if i am wrong.
jcr:contains uses the Lucene full text search syntax, which supports "*", "?" and "~" wildcards.
Thanks for the post.
The link you have provided is not clear. Please post the correct link.
Same time let clear my requirement.
I have to search the user under /home/user/. Ex: I have to search for refuser9 and i have given the input as refuse9, which is not correct. But my query has to searchc for refuse9 and also its nearest match like refuser9, which is generally called fuzzy or nearest match search.
using contains or jcr:contains is doing the full text search but is not doing the search that i have mentioned in this example.
I hope this clears the confusion and my requirement.
Sorry, not sure what messed up the link. Here is it on markmail:
Here is the standard Lucene query syntax:
Now if you don't want (fuzzy) full text search there is also jcr:like (jcr xpath) which can be used using the "like" operation on the "property" predicate in the cq query builder (wildcard is %):
What should I give for fuzzy search in property.operation?
I gave property.operation=like and tried to use ~ but not working.
I am using below query:
It is not returning any value.But If I gave below Query then it returns the pages where the Title is 'English'.
What to do to impliment Fuzze search. I wanted to get English page when I write Englsh or something like that.
Thank you very much for the reply Aklimets. It worked. But I am not able to give parameter after ~. I saw that it takes argument after ~. Right?
Below Query worked and showed me outout for English:
But can I pass argument like "fulltext=angaash~2" So that it checked all the workds which matches last two or so? Does it useful or required? significance? I jsut saw this in Lucene that we can pass argument as well.
From what I know, it should work as in Lucene. But that value is supposed to be between 0 and 1: http://lucene.apache.org/core/old_versioned_docs/versions/2_9_1/queryparsersyntax.html#Fuz zy%20Searches