Re: matching "starts with" only

2014-08-13 Thread Erick Erickson
I'd recommend that you spend some time with the admin/analysis page. KeywordTokenizer doesn't break up the input at _all_. So the text "this is a black cat" will never match anything that starts out "black". String is even more restrictive, it not only doesn't tokenize, it won't allow lower case.

Re: matching "starts with" only

2014-08-12 Thread zameer
On solr3.6 search while giving query "black\ cat*"(as you mentioned in post), I am not getting any result. Instead of "black\ cat*" if I am querying "black*\ cat*", its giving result as black forest cat black cat black color cat. But I need only these type result i.e. black cat black cat is beaut

Re: matching "starts with" only

2014-08-06 Thread Erick Erickson
Right, this is a quirk of phrase queries. For wildcards to work in phrase queries you need SOLR-1604 (ComplexPhraseQueryParser). Or you need to escape your spaces, i.e. black\ cat* Best, Erick On Tue, Aug 5, 2014 at 11:09 PM, zameer wrote: > If we search only "black*" it works but when we use

Re: matching "starts with" only

2014-08-05 Thread zameer
If we search only "black*" it works but when we use search text "black cat*" or "(black cat)*" or "(black cat*)*" it come blank. Thank you in advance -- View this message in context: http://lucene.472066.n3.nabble.com/matching-starts-with-only-tp4094430p4

Re: matching "starts with" only

2013-10-10 Thread Erick Erickson
Be aware that the string type is not analyzed in any way, so your searches are case sensitive. There's a "lowercase" type in the example schema.xml that combines KeywordTokenizer with LowercaseFilter for case-insensitive searches that you might find useful. Besides regex, this might be a good plac

Re: matching "starts with" only

2013-10-10 Thread adm1n
I've changed the field name to string type, the default one presented in schema.xml, and I got what I needed. thanks for your time. -- View this message in context: http://lucene.472066.n3.nabble.com/matching-starts-with-only-tp4094430p4094637.html Sent from the Solr - User mailing list archi

Re: matching "starts with" only

2013-10-09 Thread adm1n
search by "starts with" is something new I have to add, as well as the data I have to index for this purpose, so it's ok to create a new field. But once I added the following field type: And: indexing, and afterwards searching

Re: matching "starts with" only

2013-10-09 Thread Shawn Heisey
On 10/9/2013 2:16 PM, adm1n wrote: Why this field have to be copyField? Couldn't it be a single field, for I always assume that people already are using the existing field and type for other purposes. Offering advice without making that assumption will usually result in people making a chang

Re: matching "starts with" only

2013-10-09 Thread adm1n
Shawn Heisey-4: thanks for the quick response. Why this field have to be copyField? Couldn't it be a single field, for example: thanks. -- View this message in context: http://lucene.472066.n3.nabble.com/matching-start

Re: matching "starts with" only

2013-10-09 Thread Shawn Heisey
On 10/9/2013 12:57 PM, adm1n wrote: My index contains documents which could be a single word or a short sentence which contains up to 4-5 words. I need to return documents, which "starts with" only from the searched pattern. in regex it would be [^my_query]. for example, for a docs: black beaut