Quote:
I'm a newbie to hibernate search. I'm working on free text search where im indexing a filed to get skills in the following manner java,vb,j2ee. I'm able to retrieve the data from the db for all the scenarios of search except for single word search. Eg say i'm searching for java skills, i get all the results but fail to retrieve the data if it is something like j2ee,vb,java.
I am not quite sure where your problem with "j2ee,vb,java" occurs? Is this the data you want to index or is this somehow the input to your query generation method. You should also post the annotated Opportunity class so that we can see what's indexed and how.
Your query code also looks very strange. In the case where the skills string is comma separated you seem to execute a search for each skill. That won't perform very well. You should build one single query string or use the Lucene's programmatic Query API to build a single query.
In string form you want something like: " skillsNeeded: j2ee skillsNeeded: vb skillsNeeded: java title: foo " - you get the picture. Check the Lucene query syntax -
http://lucene.apache.org/java/2_3_2/que ... yntax.html - for more help.
--Hardy