16
che sto cercando di fare il seguente filtro termineFiltro termini Elasticsearch non funziona?
{
"query": {
"term": {
"name": "terry harvey"
}
}
}
e sto ottenendo 0 hits
{
took: 3
timed_out: false
_shards: {
total: 5
successful: 5
failed: 0
}
hits: {
total: 0
max_score: 0
hits: [ ]
}
}
Quando ho usato il "filtro partita" invece "filtro termine", ottengo 48 colpi.
Cosa sto sbagliando? = (
Grazie!
Vedo ma come posso fare per ottenere un documento con il nome esatto come "terry harvey"? –
Dovresti cambiare la mappatura del campo in [not_analyzed] (http://www.elasticsearch.org/ guide/it/elasticsearch/guide/current/mapping-intro.html # _literal_index_literal). Se è necessario eseguire una query sia con valori esatti che con testo completo, è necessario esaminare il [campo multiplo] (http: //www.elasticsearch .org/guida /en/elasticsearch/reference/current/mapping-core-types.html#_multi_fields_3) tipo. –
Grazie, I'll it =) –