[okfn-labs] Limit ElasticSearch files in query
Kubes
pkubat.mlist at freepricealerts.com
Fri Mar 15 17:04:35 UTC 2013
All,
Where is the correct place to specify the fields that will be returned for
a ElasticSearch backend query? I want to limit which fields are returned.
I have tried in the dataset and also the query, but neither seems to work.
var fields = new recline.Model.FieldList([ new recline.Model.Field({
label: "title"}), new recline.Model.Field({ label: "author"}) ]);
var dataset = new recline.Model.Dataset({
url: 'http://es.domain.com:9200/items/books',
backend: 'elasticsearch',
fields: fields
});
Also tried
var query= new recline.Model.Query({
query: {query_string: {query: 'war and peace'},
fields: ["title^5","author^3"] },
size: 10,
fields: fields
});
Can someone please provide an example?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/okfn-labs/attachments/20130315/020c8ce0/attachment-0001.html>
More information about the okfn-labs
mailing list