lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject A bit stuck on index and search (v4.1.0) (FWD)
Date Mon, 11 Feb 2013 18:22:15 GMT
The message below sat un-attended in the moderation queue for so long it
was automatically rejected.  I'm resending it on the OP's behalf


---------- Forwarded message ----------
From: dm_tim
Date: Mon, 4 Feb 2013 17:39:53 -0800 (PST)
Subject: A bit stuck on index and search (v4.1.0)


I am attempting to create an index and query that uses my own analyzer. 
analyzer uses the WhitespaceTokenizer and the LowerCaseFilter only. I have 
simple test that takes an array of strings and returns the tokens that 
analyzer creates and they look ok:
"Red Lobster" becomes "red", "lobster"
"The Gap" becomes "the", "gap"
"" becomes ""

So then I index a bunch of data that includes "Office Max" in a TextField 
call "name" and then I do a search that uses the same analyzer and I send
the following queries:
name:office             => returns no hits
name:max               => returns no hits
name:office max      => returns no hits
name:"office max"~  => returns no hits
name:office~          => returns hits (including the data I'm after)
name:max~            => returns hits (including the data I'm after)
name:office*          => returns hits (including the data I'm after)
name:*max             => returns hits (including the data I'm after)

OK, so what I was hoping for was to be able to enter the entire search
phrase "office max" and get hits. I'm unsure why that doesn't happen here.

Also I would like to boost hits that contain exact matches for either term
("office" or "max") but am unsure how to make that work. I could use a
technical assist if possible.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message