2016-03-10 3 views
11

Structuredクエリでは、phrasetermの違いは何ですか?構造化クエリのフレーズと用語の違いは何ですか?

私はCloudSearchドメインでこのデータを持っている:

{ 
    "guid": 9, 
    "operating_systems": [ 
     "12345", "123" 
    ], 
    "manufacturer": "sealand", 
    "model": "gaming tree whale plum", 
    "identifier": "gaming tree whale plum", 
    "type": "computer", 
    "created_at": "1982-10-14T14:43:54Z" 
} 

"model""identifier""created_at"date型で、literalを入力され、textを入力しています。

はのは、いくつかのクエリを作成してみましょう:

(phrase field=model 'tree whale')    match 
(phrase field= identifier 'tree whale')   no match 
(phrase 'tree whale')       match 
(phrase field=created_at '1982-10-14T14:43:54Z') match (this shouldn't match according to docs) 

(term field=model 'tree whale')    match 
(term field= identifier 'tree whale')   no match 
(term 'tree whale')       match 
(term field=created_at '1982-10-14T14:43:54Z') match 

は私がtermおよびその逆に行うことができないphraseに何かできることはありますか?

+0

'phrase'は、正確な順序と' term'の試合に一致します。 「愚かなフレーズ」が可能です。他の具体的な違いをお探しですか? – jbird

答えて

1

term VS phraseの構文と使用法にはほとんど違いがありません。しかし、phrasesを扱うの検索行動は、さまざまな方法termsにカスタマイズすることができ、性能を向上させるために使用することができ、することはできません。

事業者
  • phraseFields
  • phraseSlop
  • Termsがマッチングのために意図されている許可

    +0

    *フレーズがより複雑な検索を意図していると言うとき*あなたはどういう意味ですか?私は、フレーズが検索に関してはより厳密で柔軟性が低いと思っていたでしょうから、全体的には複雑ではありません。 – apokryfos

    +0

    私は推測することができます。どんなアーキテクチャーでも、剛性が高いほどパフォーマンスが向上するだけでなく、それに依存するコンポーネントの柔軟性も向上します。最終的に、フレーズはエイリアスや同等の用語の意味を考慮した場合にのみ、より柔軟になります。 {シトラス、レモン、オレンジ} {ラージ、ビッグ、巨大} '(フレーズ"ビッグレモン ")はすべての可能な組み合わせにマッチします。 –

    +0

    'term'で各単語をチェックすることはなく、全体をチェックするだけです。 –

    1

    誰もが疑問に思っている場合には、用語の検索がかもしれ条件に一致しながら、フレーズ検索は、フレーズ全体が一致することが判明文章の周りに広がった言葉かもしれません。例:

    テキスト:

    "model": gaming tree whale plum 
    

    次ホールド:フィールドはどこにでも検索用語が含まれている場合

    (phrase field=model 'tree whale')    match 
    (phrase field=model 'tree plum')     no match 
    
    (term field=model 'tree whale')     match 
    (term field=model 'tree plum')     match 
    
    関連する問題