ES 6.5.2 Search for specific terms that appear on the same line in a multiline text field

Hi Guys,

What is the best way to search for multiple specific terms in a multiline text field but only if those terms appear on the same line in that multiline text field?

I couldn't achieve this using the simplied Lucene query and having even more problems using the regexp - can't get regexp to work either.

For this particular index, the _all field is not disabled.

Cheers,

Hi,

When you say "the same line" you think the same line (line break) or same phrase (punctuation) ?

Take a look at:
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html

bye,
Xavier

Hi Xavier, thanks for the response, by the same line I mean delimited by line break.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.