If I want to search for Keyword "Error Message" , Can lucene be able to lend me results matching "Error Message" and "Message Error". Currenlty i am getting results matching "Error Message" Only. I am using Standard Analyser and Query Parser for searching a Keyword.
相关问题
- What is the best way to do a search in a large fil
- JCR-SQL - contains function doesn't escape spe
- Search Multiple Arrays for
- Find index given multiple values of array with Num
- Google Custom Search Engine not giving the expecte
相关文章
- What is the complexity of bisect algorithm?
- Solr - _version_ field must exist in schema and be
- Visual Studio: Is there an incremental search for
- How do I hide a site from search engines? [closed]
- Why is C# Array.BinarySearch so fast?
- Find three elements in a sorted array which sum to
- TreeMap - Search Time Complexity
- performance for searching through 100 million reco
There isn't anything that will do quite that, other than doing it as a search for "Error Message" OR "Message Error".
But if you search for
then you'll get everything where the title matches "Error" and "Message".
One key point, though: if you're programmatically constructing a Lucene query, you really shouldn't be using
QueryParser
. You should be using aQueryBuilder
to construct it structurally.QueryParser
is only for human-generated queries that a user might type into your application.Use a
PhraseQuery
with slop > 0. From the javadoc: