Hi Mikhail,

Thank you very much for your response.

I've tried the way you suggested and it successfully expanded into a
MultiPhraseQuery.

```xml
<fieldType name="text_bigram" class="solr.TextField"
enableGraphQueries="false">
```

I sincerely appreciate your assistance.

Best regards,
Mingchun


2024年12月14日(土) 20:10 Mikhail Khludnev <m...@apache.org>:

> Hello Mingchun,
> adding
>
> <fieldType name="text_bigram" class="solr.TextField"
> enableGraphQueries="false">
>
> yields the expected
> MultiPhraseQuery(city:"(東 東京) 京")
>
>
> On Sat, Dec 14, 2024 at 2:41 AM Mingchun Zhao <mingchun.zha...@gmail.com>
> wrote:
>
> > Hi,
> >
> > When performing a phrase query using CJKBigramFilter with the
> > outputUnigrams=true in Solr 9, it does not expand into a
> MultiPhraseQuery.
> > Could this be due to a specification change?
> >
> > Below are the details:
> >
> > Field Definition:
> > *```*
> > <field name="city" type="text_bigram" indexed="true" stored="true"
> > multiValued="true" />
> > <fieldType name="text_bigram" class="solr.TextField">
> > <analyzer>
> > <tokenizer class="solr.StandardTokenizerFactory"/>
> > <filter class="solr.CJKBigramFilterFactory" outputUnigrams="true"/>
> > </analyzer>
> > </fieldType>
> > ```
> >
> > When performing the phrase search with q=city:"東京"("東京" is the kanji
> > representation of "Tokyo"):
> >
> > In Solr 4.10.4:
> > ```
> > "debug": {
> > "rawquerystring": "city:\"東京\"",
> > "querystring": "city:\"東京\"",
> > "parsedquery": "MultiPhraseQuery(city:\"(東 東京) 京\")",
> > "parsedquery_toString": "city:\"(東 東京) 京\"",
> > *```*
> >
> > In Solr 9.4.0:
> > ```
> > "debug":{
> > "rawquerystring":"city:\"東京\"",
> > "querystring":"city:\"東京\"",
> > "parsedquery":"PhraseQuery(city:\"東 京\") city:東京",
> > "parsedquery_toString":"city:\"東 京\" city:東京",
> > "explain":{ },
> > "QParser":"LuceneQParser",
> > *```*
> >
> >
> > I’d appreciate any information you might have about this.
> >
> > Regards,
> > Mingchun
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>

Reply via email to