Sorry. I don't get it.
You want to create an array of values?
Search something in that array?
Right?
That's something Elasticsearch deals with. I don't see your concern.
A real example should help a lot.
About couchdb views, you can't index it right now. See Add support for views by dadoonet · Pull Request #24 · elastic/elasticsearch-river-couchdb · GitHub
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 7 juil. 2013 à 08:03, bryan rasmussen rasmussen.bryan@gmail.com a écrit :
oops, sent that last one accidentally
I think I found a way to do what I want, but I'd like some feedback
before I start - especially as it will help me developing some other
applications with elasticsearch as the search engine that I am working
on right now -
given that: "...elasticsearch can easily have several couchdb rivers
(and other types of rivers) running at the same time, all pointing to
different databases and indexing them into different indices (or the
same index, you choose) using the same elasticsearch cluster."
Can I index just a view in a river and then do something like the following?
"filter" : "tagfilter",
"filter_params" : {
"tag" : doc['field_name'].values
}
So the view returns documents with tags and probably some other data
relevant to display in the application when sorting documents by tag,
the tag param should then allow me to do a search with the param
tag=couchdb and if I have ["couchdb","elasticsearch","other tag"] as
the tags array in my document I should be able to return that
document.
Does this sound correct?
Can I actually do "tag" : doc['field_name'].values (or some variation
that gives the same result) in my filter_params or am I going to have
to go to scripting?
Thanks,
Bryan Rasmussen
On Sun, Jul 7, 2013 at 7:47 AM, bryan rasmussen
rasmussen.bryan@gmail.com wrote:
I think I found a way to do what I want, but I'd like some feedback
before I start - especially as it will help me developing some other
applications with elasticsearch as the search engine that I am working
on right now -
question
On Thu, Jul 4, 2013 at 7:20 PM, bryan rasmussen
rasmussen.bryan@gmail.com wrote:
David Pilato david@pilato.fr Jul 04 09:17AM +0200
If it's not the answer you were expected, could you update your question with >some
sample data and describe the result you want to have from that data?
My main problem is that the way to handle tags in couchdb to do stuff like
- return all documents that have tag1 (where a tag can be
anydescripting text applied to a document by a user)
and
- return all documents that have tag1 + tag2 + tag3
and so forth
tend to be verbose and expensive.
To do that in Solr is quite easy, but snce the search is actually not
that important a part of the application I didn't want to go through
the trouble of setting up, maintaining Solr, instead I just used
elasticsearch couchdb river.
So I would like a way to handle the problem in elasticsearch with
hopefully not a lot of work
tags in my documents are represented as arrays.
so solutions I might expect to be possible would be:
a way to write a query that allows me to search for a value inside of
an array item, by using a special parameter in the query.
or
have a view that does not do the common couchdb thing of outputting a
document per tag but solves the problem in some other way, and
indexing that view?
or
create a special query handler that only indexes items in the array,
so that each array[i] becomes
tag = value of array[i]
which is of course the same as couchdb way of having a view output new
document per actual tag in tags array, except the way elasticsearch
does it will not have the drawbacks of couchdb writing multiple
documents to disk.
Thanks,
Bryan Rasmussen
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.