# Does combined\_fields query (or multi-match+cross\_fields) support phrase?

**URL:** <https://discuss.elastic.co/t/does-combined-fields-query-or-multi-match-cross-fields-support-phrase/318837>\
**Category:** Elasticsearch\
**Created:** [November 14, 2022, 8:03am UTC](https://discuss.elastic.co/t/does-combined-fields-query-or-multi-match-cross-fields-support-phrase/318837 "2022-11-14T08:03:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yliu000](https://avatars.discourse-cdn.com/v4/letter/y/f475e1/32.png) [@yliu000](https://discuss.elastic.co/u/yliu000)\
**Post date:** [November 14, 2022, 8:03am UTC](https://discuss.elastic.co/t/does-combined-fields-query-or-multi-match-cross-fields-support-phrase/318837/1 "2022-11-14T08:03:00Z")

</div>

Hi,

I have documents with multiple fields, and want to do "term centric" search, instead of "field centric" search. (Following [term centric combined\_fields](https://opensourceconnections.com/blog/2021/06/30/better-term-centric-scoring-in-elasticsearch-with-bm25f-and-the-combined_fields-query/) for "term centric" definition).

I have two needs:

First, I need to do PHRASE search across fields, but want the score to be "term centric". That is, I don't want to field level IDF.

- "multi-match + phrase" can support phrase, but "multi-match+phrase" is doing "field centric" scoring, make the scoring result bad.
- another way hacky way I tried is creating a query look like:

```auto
BOOL
    MUST
        "multi-match", type=cross_fields, query="hello world", fields=[...]
    FILTER
        "multi-match", type=phrase, query="hello world", fields=[...]

```

This hacky way can work, but really ugly, and the score is not exactly calculated from PHRASE.

It seemd either "combined\_fields" and "multi-match + cross\_fields" support PHRASE.

========

The other thing I want to do, is "bigram boost". Basically, when user search "hello world", I want to find all documents containing "hello" and containing "world", but give more score when "hello world" is consequtive (boost the bigram). And the search is again, across multiple fields.

One way I can think of, is creating a query like:

```auto
BOOL
     MUST
         "multi-match", type=cross_fields, query="hello world", fields=[...]
     SHOULD
         "multi-match", type=PHRASE, query="hello world", fields=[...]

```

But the "SHOULD" part will calculate score using "field centric" way, and using field level IDF, the score will be unexpected high (or low) depend on the query and field, making the boost becoming uncontrollable.

I really appreciate any suggestion on this.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 12, 2022, 8:03am UTC](https://discuss.elastic.co/t/does-combined-fields-query-or-multi-match-cross-fields-support-phrase/318837/2 "2022-12-12T08:03:52Z")

</div>

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