Hi All,
I am getting a Strange behaviour with it
i have stored data in multiple rows each row contains 1 English alphabet.
that is
row 1-------------------a
row2--------------------b
-
-
-
-
row----------------------z
just for testing purpose :)
it gives perfect result for some query or some specific characters only
like if i search letter
a then it returns nothing and if i search letter
c,d, or s it gives wrong result :(, and for rest of the letters it works fine.
here is the code for
indexer......
Code:
FullTextSession fullTextSession = getFullTextSession();
List results = fullTextSession.createCriteria(InstantMessage.class).list();
for (Object im : results) {
fullTextSession.index(im);
}
for search query Code:
String temp[] = { "message" };
QueryParser parser = new MultiFieldQueryParser(temp,
new StandardAnalyzer());
Query query = null;
org.apache.lucene.search.Query luceneQuery = null;
try {
luceneQuery = parser.parse(getSearchString());
} catch (ParseException parEx) {
parEx.printStackTrace();
}
return ((FullTextEntityManager) em).createFullTextQuery(luceneQuery,
InstantMessage.class);
Any Clue Guys
Regards,
Sachin Parnami