Hello,
I'm getting started setting up Elasticsearch for a technical documentation website. We are using this stack:
- Elastic Cloud
- Indexing via the Web Crawler
- Search UI for the frontend
I'm having a hard time getting a simple keyword search working against the fields that were defined by the crawler. When I search for something with multiple words, I get an error:
failed to create query: field:[body_content] was indexed without position data; cannot run PhraseQuery
Searches with one word work fine.
The error comes up both when searching through our UI, and querying using the console directly like this:
GET /my-index-name/_search
{
"query": {
"match_phrase": {
"headings": "git merge"
}
}
}
This request returns the PhraseQuery error. Searching just the word "git" returns results as expected.
The crawler-defined fields don't appear to be configurable, so everything I've found about adjusting the field mappings does not seem to apply here.
This seems so basic, but how do we search multiple words against fields defined by the crawler?
Thanks!