Hi! 

I have made an analyzer which gives me all trigrams of my input (as per 
http://www.elastic.co/guide/en/elasticsearch/guide/current/ngrams-compound-words.html).
 
The thing is, I ALSO want all two letter words (and maybe also one letter 
words) to be indexed.

So basically, the string "I like to write my programs in C" would yield:

   - I
   - lik
   - ike
   - to
   - wri
   - rit
   - ite
   - my
   - pro
   - rog
   - ogr
   - gra
   - ram
   - ams
   - in
   - c

Otherwise, it would be impossible to search for short words. 

Is there any way to accomplish this?

I got a tip about using multi fields. But I want to search through the 
entire document using a query string, and I don't know beforehand which 
fields will exist. I currently do this via the _all field, but it didn't 
seem like I could use analyzers for different parts of the _all field. Does 
this mean I have to set "store":"yes" to all my fields? Or can I combine 
query string with multi_match?

... It seems like I found the answer to some of the above questions just by 
asking them.

{
  "query": {
    "query_string":{
      "fields": [ "*" ],
      "query": "2007",
      "minimum_should_match": "-25%",
      "lenient": true
    }
  }
}

When sending the above query to Elastic Search, it will crash if the query 
does not resemble a date or time, even though lenient is set to true. Am I 
doing something wrong?

Also, minimum_should_match seems to not be working as expected (or at least 
as I expected) when using a non-negative number. With only two tokens and a 
min match of 75%, results where only one token matches comes up. I could 
explain in more detail. but maybe this one deserves its own question.

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/2bd71b8b-63d8-40eb-994b-9dd194394b24%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to