faceted-search

Multiple properties in facet (elasticsearch)

橙三吉。 提交于 2020-01-04 13:42:28
问题 I have following index: curl -XPUT "http://localhost:9200/test/" -d ' { "mappings": { "files": { "properties": { "name": { "type": "string", "index": "not_analyzed" }, "owners": { "type": "nested", "properties": { "name": { "type":"string", "index":"not_analyzed" }, "mail": { "type":"string", "index":"not_analyzed" } } } } } } } ' With sample documents: curl -XPUT "http://localhost:9200/test/files/1" -d ' { "name": "first.jpg", "owners": [ { "name": "John Smith", "mail": "js@example.com" }, {

Multiple properties in facet (elasticsearch)

假如想象 提交于 2020-01-04 13:40:48
问题 I have following index: curl -XPUT "http://localhost:9200/test/" -d ' { "mappings": { "files": { "properties": { "name": { "type": "string", "index": "not_analyzed" }, "owners": { "type": "nested", "properties": { "name": { "type":"string", "index":"not_analyzed" }, "mail": { "type":"string", "index":"not_analyzed" } } } } } } } ' With sample documents: curl -XPUT "http://localhost:9200/test/files/1" -d ' { "name": "first.jpg", "owners": [ { "name": "John Smith", "mail": "js@example.com" }, {

Tree search with Lucene

落爺英雄遲暮 提交于 2020-01-04 12:47:21
问题 I have a taxonomy index that describes a tree structure. When performing a query I want to get the number of hits for multiple categories (not necessarily in the same level of the tree). For example, given the following list of paths: [Root/Cat1, Root/Cat1/Cat12, Root/Cat3] I want to obtain the number of hits for each of these three categories. I've been looking for a solution and I know that is possible to make a tree request and then get the results by calling .getSubResults() (as it is

Faceted searching and categories in MySQL and Solr

一笑奈何 提交于 2020-01-01 18:53:25
问题 I'd like to be able to do a search page similar to ebay or newegg where you can select categories and different facets depending on the categories - could anybody point me in the right direction? How do I store and search such facets and categories with the products in Solr and what sort of DB schema would I be looking at with MySQL. (I'm guessing I'd use MySQL to feed Solr, yes?) Please excuse my lack of knowledge on these subjects - I'm pretty new to all of this. I'd greatly appreciate the

How does Lucene/Solr achieve high performance in multi-field / faceted search?

白昼怎懂夜的黑 提交于 2019-12-31 22:24:31
问题 Context This is a question mainly about Lucene (or possibly Solr) internals. The main topic is faceted search , in which search can happen along multiple independent dimensions (facets) of objects (for example size, speed, price of a car). When implemented with relational database, for a large number of facets multi-field indices are not useful, since facets can be searched in any order, so a specific ordered multi-index is used with low chance, and creating all possible orderings of indices

How does Lucene/Solr achieve high performance in multi-field / faceted search?

折月煮酒 提交于 2019-12-31 22:23:24
问题 Context This is a question mainly about Lucene (or possibly Solr) internals. The main topic is faceted search , in which search can happen along multiple independent dimensions (facets) of objects (for example size, speed, price of a car). When implemented with relational database, for a large number of facets multi-field indices are not useful, since facets can be searched in any order, so a specific ordered multi-index is used with low chance, and creating all possible orderings of indices

solr facet search truncate words

雨燕双飞 提交于 2019-12-24 11:24:34
问题 have a solr configured for french content. Search is fine, but when i activate facet search, words are truncated in a special way. All e disappear, for eg automobil instead of automobile, montagn instead of montagne, styl instead of style , homm => homme etc.... <lst name="keywords"> <int name="automobil">1</int> <int name="citroen">1</int> <int name="minist">0</int> <int name="polit">0</int> <int name="pric">0</int> <int name="shinawatr">0</int> <int name="thailand">0</int> </lst here is the

Multi-select Solr filtering and faceting

跟風遠走 提交于 2019-12-24 05:48:48
问题 I'm trying to implement facets for my Solr service, but I'm a bit confused as to what I'm seeing. I understand that Tags and Exclusions are used to ignore specific filter counts, such that something like this would happen: [] Nike 55 [] Adidas 54 [] New Balance 32 [] Black 25 [] Blue 26 [] Red 29 [] Yellow 23 --------------- [X] Nike 55 [] Adidas 54 [] New Balance 32 [] Black 20 [] Blue 15 [] Red 13 [] Yellow 13 [X] Nike 20 [] Adidas 0 [] New Balance 0 [X] Black 20 [] Blue 15 [] Red 13 []

ElasticSearch: count product attributes

孤街醉人 提交于 2019-12-24 02:18:48
问题 I have a datatype 'product' which has a field 'attributes' (dynamic object). For example, a product can contain: attributes: { "color": "White", "size": "L", } another product can contain attributes: { "color": "Black", "weight": "12 kg", } So the set of attributes is not fixed. My goal is to make faceted search over all attributes of products which were found. I found a way to manually define each attribute in 'aggregations' section: "aggregations": { "attribute_color": { "terms": { "field":

Rails: How to use facets with search results

こ雲淡風輕ζ 提交于 2019-12-24 00:58:56
问题 I have a rails application where I am searching for repair shops. The search class method looks like this: def self.search(params) if params repairshop = Repairshop.where(:approved => true) if params[:radius].present? repairshop = repairshop.near(params[:location], params[:radius]) if params[:location].present? else repairshop = repairshop.near(params[:location], 200) if params[:location].present? end if params[:keywords].present? repairshop = repairshop.joins(:specializations).joins(:brands