Re: search for documents where all words of field present in the query

2015-11-18 Thread Alessandro Benedetti
Assuming this is the only, specific kind of search you want, what about using shingles of tokens at query time and keyword tokenizer at indexing time ? Ideally you don't tokenise at indexing time. At query time you build your shingles ( apparently you need not only adiacent token shingles, so play

Re: search for documents where all words of field present in the query

2015-11-18 Thread Ahmet Arslan
Hi Jim, I think you could do some magic with function queries. https://cwiki.apache.org/confluence/display/solr/Function+Queries Index number of unique words in the product title e.g. title = john smith length = 2 return products if the number of matching terms equals to the number of words

Re: search for documents where all words of field present in the query

2015-11-17 Thread Alexandre Rafalovitch
Are you sure your original description is not a reverse of your use-case? Now, it seems like you just want mm=100 which means "samsung" will match all entries, but "samsung 32G" will only match 3 of them. https://wiki.apache.org/solr/DisMaxQParserPlugin#mm_.28Minimum_.27Should.27_Match.29 Sol

Re: search for documents where all words of field present in the query

2015-11-17 Thread superjim
Thank you so match for answer! I'm check Luwak solution. By business case is very common and simple. 1) user search for products. sample real query: smartphone samsung s3 black 32G 2) i have really big database of products. I want return to user all products from my database: "Samsung s3 32g BL

Re: search for documents where all words of field present in the query

2015-11-17 Thread Alexandre Rafalovitch
This sounds more like a use case for https://github.com/flaxsearch/luwak Or a variation of Ted Sullivan's work: http://lucidworks.com/blog/author/tedsullivan/ I do not think this can be done in Solr directly. If your matched fields were always 2-tokens, you could do complex mm param. If the words

Re: search for documents where all words of field present in the query

2015-11-17 Thread superjim
There the same questions I've found in google: Solr query must match all words/tokens in a field http://stackoverflow.com/questions/10508078/solr-query-must-match-all-words-tokens-in-a-field Syntax for query where all words in field must be present in query http://stackoverflow.com/questions/1839