Lucene search problem with comman words and composite query
Hi,
I am facing some strange problem in lucene search.
My lucene document has three field
1. name
2. description
3. themeid
i am creating my indexes with these three fields.
I have these scenario in serach.
User can enter any theme and common word to search a document.
so the query is 12_theme and a
where 12_theme is theme id and a is common word.
This work fine serach result will give me all the results which have theme id 12_theme and contains a in their text part.
But problem occurs when i searched for all themes and common word a
ex search query is a
So no theme is specified this doesn't give me any result.
But if i queried for a valid name other than the common words like "badger"
It gives me the document who has name index "badger".
I don't know why it is happening in case of all theme search lucene is ignoring common words(a,is,was etc).
But with specific theme its working.
Please help me in this matter.
Regards
Virendra
Lucene search problem with comman words and composite query
You need to check your stopwords; this is much easier in Solr than Lucene, take a look at
Stop Filter - Search by Lucid Imagination
Hope this helps.
cheers
Ervin