I'm trying to build a faceted navigation UX on a corpus with documents
containing many (thousands of) properties. Users will be applying multiple
filters (filter such as: documents must contain an assignment for property
'X' that matches 'Y') to reduce their current document set to manageable
size. To power this UI, I'd like to provide a 'typeahead' experience--users
can begin typing out the names of properties (or assignments), and this
text will be matched using match_phrase_prefix. That is solved for
filtering documents (without typeahead) very easily (I already have it
working).
What I'd like to now do is filter facets based on the search term. That
is, I'd like to return property names (and values) as the user types into a
search box, with counts of documents that have assignments for that
property name and value. As an example, a user has selected 'Category >
Camcorders' and the user is now searching the text 'Son', they will be
presented with an option 'Manufacturer > Sony (53)', where 53 is the count
of documents which have a property value assignment of 'Sony' for the
'Manufacturer' field, as it pertains to the already applied filters,
i.e., there are 53 Sony camcorders in the corpus.
My (slimmed down) mapping is here:
As in the gist, I have added assignments as nested docs, and I'm using
nested faceting to provide an unfiltered view of the property assignments
based on the user's current set of filters (i.e., I can show a user what
properties and values are assigned to documents that are tagged as Sony
Camcorders, as well as the number of documents that those properties and
values are tagged on). But I can't figure out how to filter the facet
results based on a user's text.
I'm trying to build a faceted navigation UX on a corpus with documents
containing many (thousands of) properties. Users will be applying multiple
filters (filter such as: documents must contain an assignment for property
'X' that matches 'Y') to reduce their current document set to manageable
size. To power this UI, I'd like to provide a 'typeahead' experience--users
can begin typing out the names of properties (or assignments), and this text
will be matched using match_phrase_prefix. That is solved for filtering
documents (without typeahead) very easily (I already have it working).
What I'd like to now do is filter facets based on the search term. That is,
I'd like to return property names (and values) as the user types into a
search box, with counts of documents that have assignments for that property
name and value. As an example, a user has selected 'Category > Camcorders'
and the user is now searching the text 'Son', they will be presented with an
option 'Manufacturer > Sony (53)', where 53 is the count of documents which
have a property value assignment of 'Sony' for the 'Manufacturer' field, as
it pertains to the already applied filters, i.e., there are 53 Sony
camcorders in the corpus.
As in the gist, I have added assignments as nested docs, and I'm using
nested faceting to provide an unfiltered view of the property assignments
based on the user's current set of filters (i.e., I can show a user what
properties and values are assigned to documents that are tagged as Sony
Camcorders, as well as the number of documents that those properties and
values are tagged on). But I can't figure out how to filter the facet
results based on a user's text.
In the (fairly simplified) query I've provided, I can filter the document
set to facet on, using facet_filter, but the facet values coming back are
not filtered--they still include entries for other manufacturers. That's
what I'd like to filter. I suspect that this will likely involve another
index, or a faceting plugin, but I'm hopeful that it may not (or someone
can give me some guidance on where to start building that)
-Dan
On Monday, December 3, 2012 7:49:17 AM UTC-5, Martijn v Groningen wrote:
Hi Dan,
Can you share your search request or the relevant parts of it?
Inside the nested filter you can embed whatever filter you need to
execute on the nested docs.
Martijn
On 2 December 2012 09:02, Dan Spangenberger <dspange...@salsify.com<javascript:>>
wrote:
Hi all-
I'm trying to build a faceted navigation UX on a corpus with documents
containing many (thousands of) properties. Users will be applying
multiple
filters (filter such as: documents must contain an assignment for
property
'X' that matches 'Y') to reduce their current document set to manageable
size. To power this UI, I'd like to provide a 'typeahead'
experience--users
can begin typing out the names of properties (or assignments), and this
text
will be matched using match_phrase_prefix. That is solved for filtering
documents (without typeahead) very easily (I already have it working).
What I'd like to now do is filter facets based on the search term. That
is,
I'd like to return property names (and values) as the user types into a
search box, with counts of documents that have assignments for that
property
name and value. As an example, a user has selected 'Category >
Camcorders'
and the user is now searching the text 'Son', they will be presented
with an
option 'Manufacturer > Sony (53)', where 53 is the count of documents
which
have a property value assignment of 'Sony' for the 'Manufacturer' field,
as
it pertains to the already applied filters, i.e., there are 53 Sony
camcorders in the corpus.
As in the gist, I have added assignments as nested docs, and I'm using
nested faceting to provide an unfiltered view of the property
assignments
based on the user's current set of filters (i.e., I can show a user what
properties and values are assigned to documents that are tagged as Sony
Camcorders, as well as the number of documents that those properties and
values are tagged on). But I can't figure out how to filter the facet
results based on a user's text.
In the (fairly simplified) query I've provided, I can filter the document
set to facet on, using facet_filter, but the facet values coming back are
not filtered--they still include entries for other manufacturers. That's
what I'd like to filter. I suspect that this will likely involve another
index, or a faceting plugin, but I'm hopeful that it may not (or someone can
give me some guidance on where to start building that)
-Dan
On Monday, December 3, 2012 7:49:17 AM UTC-5, Martijn v Groningen wrote:
Hi Dan,
Can you share your search request or the relevant parts of it?
I'm trying to build a faceted navigation UX on a corpus with documents
containing many (thousands of) properties. Users will be applying
multiple
filters (filter such as: documents must contain an assignment for
property
'X' that matches 'Y') to reduce their current document set to manageable
size. To power this UI, I'd like to provide a 'typeahead'
experience--users
can begin typing out the names of properties (or assignments), and this
text
will be matched using match_phrase_prefix. That is solved for filtering
documents (without typeahead) very easily (I already have it working).
What I'd like to now do is filter facets based on the search term. That
is,
I'd like to return property names (and values) as the user types into a
search box, with counts of documents that have assignments for that
property
name and value. As an example, a user has selected 'Category >
Camcorders'
and the user is now searching the text 'Son', they will be presented
with an
option 'Manufacturer > Sony (53)', where 53 is the count of documents
which
have a property value assignment of 'Sony' for the 'Manufacturer' field,
as
it pertains to the already applied filters, i.e., there are 53 Sony
camcorders in the corpus.
As in the gist, I have added assignments as nested docs, and I'm using
nested faceting to provide an unfiltered view of the property
assignments
based on the user's current set of filters (i.e., I can show a user what
properties and values are assigned to documents that are tagged as Sony
Camcorders, as well as the number of documents that those properties and
values are tagged on). But I can't figure out how to filter the facet
results based on a user's text.
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.