Middleword and text group search

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Middleword and text group search

Charlie Schaubmair
Hello Solr Group,
 
this is my first day with Solr and now I'm looking if there is a way to make
a middleword search like:
*searchword*
Yes, I know this is not the work of a fulltextsearch, but I've a case where
this is needed. :-(
One way, because I think the normal middleword-search will kill the
perfomance, can be to make an own index with all of the middlewords.
Do you think this is possilbe with Solr?
Becaue I know all of the thousands of middle search words my users are
using, so I can build up an own Index with it, right?
How does this work, or where can I found more information about that?
 
Also one of the horrible things is to let users search with a text group
like:
"the dog is brown"
and this means that these 4 words have to be in the text and also in the
given order.
For example:
The day is green and the dog is brown, but you'r nice. :-) --> This should
be found ( No, I'm not drunken )
The day is green and the dogs are brown, but you'r nice. --> Should not be
found, because there are not the exact words.
Do you think this is possible with Solr, or do I also have to make my own
Index with such "text groups"?
 
Sorry for my bad English.
 
regards
Charlie ( a new but very interested Solr user )
Reply | Threaded
Open this post in threaded view
|

Re: Middleword and text group search

hossman

: this is my first day with Solr and now I'm looking if there is a way to make
: a middleword search like:
: *searchword*

FYI: i've never seen the term "middleword" used before, this is usually
refered to as "wildcard query" that has the unique property of including a
"leading wildcard" character ... searching lucene mailing lists and
documentation should help you find some techniques and tradeoff
descriptions for accomplishing this -- including using "n-grams" based
approaches which can be faster then the more conventional WildCardQuery at
the expense of a much bigger index.

: "the dog is brown"

: The day is green and the dog is brown, but you'r nice. :-) --> This should
: be found ( No, I'm not drunken )
: The day is green and the dogs are brown, but you'r nice. --> Should not be
: found, because there are not the exact words.

a normal phrase search will do this for you as long as you do not use
stemming. (or stop words)




-Hoss