lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Advice on Exact Matching?
Date Tue, 04 Jan 2011 21:28:45 GMT

: I am trying to make sure that when I search for text—regardless of
: what that text is—that I get an exact match.  I'm *still* getting some
: issues, and this last mile is becoming very painful.  The solr field,
: for which I'm setting this up on, is pasted below my explanation.  I
: appreciate any help.

if you are using a TextField with some analysis components, it's 
virtually impossible to get "exact" matches -- where my definition of 
exact is that the query text is character for character identical to the 
entire field value indexed.

is your definition of exact match different?  i assme it must be since you 
are using TextField and talk about wanting to deal with whitespace between 
words.  so i think you need to explain a little bit better what your 
indexed data looks like, and what sample queries you expect to match that 
data (and equally important: what queries should *not* match thta data, 
and what data should *not* match those queries)

: If I want to find *all* Solr documents that match
: "[id]somejunk\hi[/id]" then life is instantly hell.

90% of the time when people have problems with "exact" matches it's 
because of QueryParser meta characters -- characters like ":", "[" and 
whitespace that the QUeryParser uses as instructions.  you can use the 
"raw" QParser to have every character treated as a literal....

	defType=raw
	q=[id]somejunk\hi[/id]

-Hoss
Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message