Hi -- if I have this object indexed like so:
$ curl -XPUT "http://localhost:9200/items_test/items" '{ "id": 999,
"colours": [ "red", "blue" ], "colour_ids": [ 4, 9 ], "status": "forsale" }'
When I do a search on the "colours" array like this:
$ curl -XGET "http://localhost:9200/items_test/items/_search?pretty=true"
-d '{ "query": { "term": { "colours": "red" } } }'
It returns the object in the results as I would expect.
Could someone advise me on how I can modify my second search so that it can
search for items dependent on the "colour_ids" array of integers?
Thankyou for any & all assistance,
Doug.
Hi -- if I have this object indexed like so:
$ curl -XPUT "http://localhost:9200/items_test/items" '{ "id": 999,
"colours": [ "red", "blue" ], "colour_ids": [ 4, 9 ], "status": "forsale" }'
When I do a search on the "colours" array like this:
$ curl -XGET "http://localhost:9200/items_test/items/_search?pretty=true"
-d '{ "query": { "term": { "colours": "red" } } }'
It returns the object in the results as I would expect.
Could someone advise me on how I can modify my second search so that it can
search for items dependent on the "colour_ids" array of integers?
Thankyou for any & all assistance,
Doug.
Hi -- if I have this object indexed like so:
$ curl -XPUT "http://localhost:9200/items_test/items" '{ "id": 999,
"colours": [ "red", "blue" ], "colour_ids": [ 4, 9 ], "status": "forsale"
}'
When I do a search on the "colours" array like this:
$ curl -XGET " http://localhost:9200/items_test/items/_search?pretty=true"
-d '{ "query": { "term": { "colours": "red" } } }'
It returns the object in the results as I would expect.
Could someone advise me on how I can modify my second search so that it
can
search for items dependent on the "colour_ids" array of integers?
Thankyou for any & all assistance,
Doug.
Hi -- if I have this object indexed like so:
$ curl -XPUT "http://localhost:9200/items_test/items" '{ "id": 999,
"colours": [ "red", "blue" ], "colour_ids": [ 4, 9 ], "status":
"forsale" }'
When I do a search on the "colours" array like this:
$ curl -XGET " http://localhost:9200/items_test/items/_search?pretty=true"
-d '{ "query": { "term": { "colours": "red" } } }'
It returns the object in the results as I would expect.
Could someone advise me on how I can modify my second search so that it
can
search for items dependent on the "colour_ids" array of integers?
Thankyou for any & all assistance,
Doug.
Hi -- if I have this object indexed like so:
$ curl -XPUT "http://localhost:9200/items_test/items" '{ "id": 999,
"colours": [ "red", "blue" ], "colour_ids": [ 4, 9 ], "status":
"forsale" }'
When I do a search on the "colours" array like this:
$ curl -XGET " http://localhost:9200/items_test/items/_search?pretty=true"
-d '{ "query": { "term": { "colours": "red" } } }'
It returns the object in the results as I would expect.
Could someone advise me on how I can modify my second search so that it
can
search for items dependent on the "colour_ids" array of integers?
Thankyou for any & all assistance,
Doug.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.