lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Omri Suissa <>
Subject Lucene query parser multiple words
Date Wed, 08 May 2013 16:34:02 GMT
When using lucene QueryParser to parse a query with multipal words i found
that the returned query is like the following:

*query text:*

word1 word2 word3 word4

*returned query:*

content:word1 content:"word1 word2" content:"word1 word2 word3"
content:"word1 word2 word3 word4"

The logic, as i understand it is: first word, first + second word, first +
second + third word and etc...

This logic sound too simple for my needs. for example if the user search
the following query:

myDoc.txt anotherDoc.txt

the user except to get results with myDoc.txt or with anotherDoc.txt (or

but... since the logic that described the user will get only results for
"myDoc.txt" and "myDoc.txt and anotherDoc.txt" and not about anotherDoc.txt
(second word alone).

*My code:*

new QueryParser(Lucene.Net.Util.Version.LUCENE_30, "content",

to "see" the query i'm using the ToString() method on the query object.

There is a way to change this behavior? (or am i missing something here?)



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message