If I run the regular search like here:
I get this result:
(same gist )
The facet area is empty, I understand why it is empty, but I was
looking for a way around it, because in my use case, I know how the
articles and tags are related (using the id of each document type)
One way around it is by adding a __id field to each document on
articles and tags that has the same document id. I then do a regular
search not asking for the facets, just the articles with title of T*,
then I parse the _id fields of those results, and query the index
again, but this time looking for the _id values on the manually
updated __id fields (using the default OR operator) and this time
asking for a facet. This works, but I wonder if there is a cleaner
On Nov 8, 9:52 pm, fmpwizard fmpwiz...@gmail.com wrote:
Let me try again.
The articles and tags have the same _id value because they are
related. Think of then as a one to one relationship from a database
point of view.
I then search for articles that start with T, how can I get a facet
with the tags for the two articles that match my query?
Thanks for taking the time
On Nov 7, 10:52 pm, Shay Banon kim...@gmail.com wrote:
Not sure I understand... . Facets are only aggregated for actual hits.
On Sun, Nov 6, 2011 at 6:15 AM,fmpwizardfmpwiz...@gmail.com wrote:
This is what I'm trying to do, taking the example from
Imagine that the Tags are on a separate type, not on the same article
You know which tags go to which article because both article and the
corresponding tags have the same _id value.
Now I can search across both types (in my real app I have 6 types in
my search), by just omitting the type on the query url, but using
facets, I only get values matching the type that returns values.
What I mean is that if the query term is just a tag, the facet will
return just information from the tags type, not from the articles
type. Is there a way to get facet values from "all" types?
In other words, looking at the example from the site, you search for
"T*" and still get facet values for the tags, even though the tags are
not on the Article type.
I hope this was clear.