-
Notifications
You must be signed in to change notification settings - Fork 761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search returns nothing without specifying fields
, but returns hits with fields
#850
Comments
I did some more tests. If field |
Using
If i understand correctly (not an expert on ES, that's why I use searchkick), this is a multi-field scenario, where It should be present in _all (as If that's the default, how we should use ElasticSearch for full text search for long documents (type And I still don't understand why the search works if I specify a field. Is |
Hey @feliperaul, thanks for digging into this. After I dug in a bit more, here's an explanation of what's happening: When you specify fields, Searchkick uses the When you don't specify fields, Searchkick uses the
From my experience, you always want to specify fields. Elasticsearch 6 will disable the However, this behavior is pretty counterintuitive, so think it's worth addressing. A few options on my mind:
|
@ankane Thanks for the quick reply. Since when people think of ElasticSearch/SearchKick they think "full text search", I think solution 1 isn't the best one because the limit is still very low for most use cases. Option 2 is by far my favorite. It should be high up in the readme, specially if ES6 will disable _all by default. BTW, it seems that the ignore_abov |
Hey @feliperaul, going with option 1. 10,922 is suggested in case all of your characters are 3 bytes. In most circumstances, this won't be the case, but if it is, users will see an error, as they do with earlier versions of Searchkick. We can address the ES 6 issue when it gets closer (my current thoughts are to require either a |
@ankane Elasticsearch 6 and it disables Also says that we can define |
Yes, I have the same "problem", can't search on _all fields anymore. |
I can't understand how the same query without fields specified returns no hits, but if I specify a field then it returns hits.
I have a simple model without any options in searchkick invocation:
I have an instance with
lorem ipsum
in the fielddescription
.This should search all fields, but returns no hits:
But the same query, specifying a field, returns hits:
The text was updated successfully, but these errors were encountered: