Elasticsearchのmulti_field構文をElasticaと組み合わせて使用しようとしています。次のようなインデックスとマッピングを作成します。
$mapping->setProperties(array(
'id' => array('type' => 'string', 'include_in_all' => true),
'title' => array('type' => 'string', 'include_in_all' => true),
'publisher' => array('type' => 'multi_field', 'include_in_all' => TRUE, 'fields' =>
array('publisherName' => array('type' => 'string', 'index' => 'analyzed'),
'untouched' => array('type' => 'string', 'index' => 'not_analyzed')
)
));
ここまでは順調ですね。タイトルフィールドに対してクエリを実行できます。
しかし、 http://example.com:9200 / _plugin / head /のフィールド「publisher」にクエリを実行しようとすると、フィールドパブリッシャーを選択したり、構造化クエリを作成したりできません。フィールドパブリッシャーはインデックスに含まれていないようです。
しかし、publisher.untouchedでファセットを作成することはできますが、これは非常にうまく機能します。私のマッピングの何が問題になっていますか?出版社を検索する必要があります。