Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To answer your last question first... you can't. Solr does not have the functionality to do leading and trailing wildcard searches. But depending on your schema setup (how individual terms are generated) combined with how you're querying the index, you may be able to do a decent approximation.</p> <p>I'm making quite a few assumptions here because the question doesn't describe your set up very well. </p> <p><strong>Assumptions:</strong></p> <ul> <li>The field you're querying contains unique values (this enables us to do a simple query. Otherwise, we'd have to do facet queries to return unique values which is a bit more complex)</li> <li>The version of solr you are using supports the eDismax query parser</li> </ul> <p><strong>Schema:</strong></p> <p>In order to match "Adam E" and "Adam Gray" to "Adam E Gray" you will need two fields, say fullName (e.g. "Adam E Gray") and firstNameLastName (e.g. "Adam Gray") These fields should both be indexed and whichever your wish to populate your filteringSelectBox should be stored with a text data type (i.e. using the "solr.WhitespaceTokenizerFactory" tokenizer). Using this tokenizer will allow "E Gray" to match "Adam E Gray"</p> <p><strong>Query String</strong></p> <p>q={!edismax qf='fullName firstNameLastName'}$name*&amp;fl=fullName&amp;rows=$count&amp;start=$start where: - $name is string to match. It doesn't have to be a complete name, but the string must begin with the beginning on a search term. I.e. "Adam E Gr" is OK (the asterisk allows trailing wildcard search), "dam E Gray" is not. - $count and $rows are set by your readStore</p>
    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.
    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