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: Another problem with the QueryParser
Date Thu, 16 Nov 2006 21:51:15 GMT
:    Find all documents in the index with the word "Table", and then from that
: list, remove any  docs that don't have "Chair"?

correct.

: If the latter is true, then how are these two queries different:
:      "Table OR NOT Chair"
:      "Table AND NOT Chair"

They aren't.  Those queries are functionally...
	Table -Chair
	+Table -Chair

Since "Table" is the only thing matching anything in both queries, they
are equivilent.

Things like these however...
	Phone OR Table OR NOT Chair
	Phone AND Table AND NOT Chair

are...
	Phone Table -Chair
	+Phone +Table -Chair

...so they are different, the first requiring either Phone or Table, the
second requireing both -- neither permitting results which match Chair.


: Along these same lines, I would've expected a query of "NOT Table" to return
: all the docs in the index that don't contain "Table",  kinda like "* NOT
: Table" (where * represents all the docs in the index). However, if I
: understood what you said, this will return no results, cause there isn't any
: portion of query that adds docs to the result set.

correct ... Lucene is not a Boolean Logic system ... it is a scoring
system. "NOT Chair" doesn't score anything, so nothing matches.




-Hoss


---------------------------------------------------------------------
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