Note that there are some explanatory texts on larger screens.

plurals
  1. POApache Solr: Faceted Search on multivalued fields
    primarykey
    data
    text
    <p>Im currently working on a solr based search application.</p> <p>I have two multivalued fields for example: The data is read out of a database.</p> <pre><code>&lt;int name="id"&gt;1&lt;/int&gt; &lt;arr name="type"&gt; &lt;str&gt;Marke&lt;/str&gt; &lt;str&gt;Modell&lt;/str&gt; &lt;str&gt;Fahrzeugtyp&lt;/str&gt; &lt;str&gt;engine&lt;/str&gt; &lt;/arr&gt; &lt;arr name="value"&gt; &lt;str&gt;Volkswagen&lt;/str&gt; &lt;str&gt;Golf&lt;/str&gt; &lt;str&gt;Golf TDI&lt;/str&gt; &lt;str&gt;V-Engine&lt;/str&gt; </code></pre> <p>In my current solr configuration there is no relationship between these two multivalued fields. So that i can say "Marke = Volkswagen". </p> <p>Besides there must be a relationship between Volkswagen and Golf. So I have to structure a taxonomy out of the two multivalued fields and of the values in the multivalued field itself.</p> <p>I tried to build a typeAhead. In my current config when i search for Volkswagen - the possible suggestions contain audi and engine2 which does not refer to a Volkswagen model. solr url:<br /><br /> <a href="http://xyz:8983/solr/suggest?&amp;wt=json&amp;facet=true&amp;q=" rel="nofollow noreferrer">http://xyz:8983/solr/suggest?&amp;wt=json&amp;facet=true&amp;q=</a>*&amp;facet.field=value&amp;facet.prefix=Volkswagen <br /><br /> I think <a href="https://stackoverflow.com/questions/9521304/solr-faceting-on-multiple-concatenated-fields">Solr Faceting on Multiple Concatenated Fields</a> has something to do with it, but I can't adjust it on my problem. </p> <p>Thanks in reply</p> <hr> <p>Maybe I can use the TemplateTransformer to combine value and type?</p> <hr> <p>With TemplateTransformer I get a result: Marke | Volkswagen</p> <p>In my data-import.xml (DIH)</p> <pre><code>&lt;entity&gt; name="tablename" transformer="TemplateTransformer"&gt; &lt;field column="test" template="${tablename.TYPE} | tablename.VALUE}"/&gt; ... &lt;/entity&gt; </code></pre> <hr>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload