lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject RE: question
Date Thu, 19 Jan 2017 22:52:11 GMT

: Yes, they should be the same unless the field is indexed with shingles, in that case order
matters.
: Markus 

just to clarify...

The examples provided show *stirngs* which would have to 
be parsed into Query objects by a query parser.

the *default* QueryParser will produce queries that result in the answers 
to your questions being "yes"

But it is fairly trivially to tweak/extend the query parser to produce 
diff behavior.

Examples...

you could use SpanNearQuery with order enforced to make the two 
queries in #1 match completey diff documents.

You could force the use of PhraseQuery or SpanNearQuery in all queries, 
such that the answer to #3 is "no", each pair of queries (with 
terms in same order) would match the same set of docs.  Conversly, you 
could make those queries allways use BooleanQuery with SHOULD clauses so 
all 4 queries would match the same (much larger) set of docs.

...It's entirely up to the query parsing code to decide what types of 
queries to produce from those inputs.

:  
: -----Original message-----
: > From:Julius Kravjar <julius.kravjar@gmail.com>
: > Sent: Monday 16th January 2017 18:20
: > To: java-user@lucene.apache.org
: > Subject: question
: > 
: > May I have one question? One company - we used their sw - talked to us that
: > in Lucene it is normal that the search results for
: > 
: > 1.
: > "sas institute"
: > "institute sas"
: > are the same.
: > 
: > 2.
: > sas institute
: > institute sas
: > are the same
: > 
: > 3.
: > the number of searches of "sas institute" is smaller then sas institute
: > (analogically "institute sas" is smaller then institute sas
: > 
: > 
: > 
: > Should we believe them? Manythanks in advance.
: > 
: > Best regards
: > 
: > J. Kravjar
: > 
: 
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
: For additional commands, e-mail: java-user-help@lucene.apache.org
: 
: 

-Hoss
http://www.lucidworks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message