Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>How you can achieve this is going to depend on your Solr schema configuration (<code>schema.xml</code>), and in particular, the field type associated with your <code>activityemail</code> field. At present, if you're receiving multiple results back, it may be because of a filter/analyzer on the given field type causing multiple matches. Solr's <code>solr.StrField</code> field class sounds like it would be the best choice for your field, as the values of fields of this type will be stored verbatim and queries will be exact matches. </p> <p>If you're already using the field elsewhere for other purposes, you might consider creating a new field just for this purpose.</p> <p>So, including this in your <code>schema.xml</code> will introduce a field type named <code>string</code>:</p> <pre><code>&lt;fieldType name="string" class="solr.StrField" sortMissingLast="true" /&gt; </code></pre> <p>If you've followed examples included with Solr's default install, then you may already have such a field type available. Your field definition should look something like:</p> <pre><code>&lt;field name="activityemail" type="string" ... /&gt; </code></pre> <p>where the ellipsis represents your various other options associated with the field.</p> <p>After restarting Solr and re-indexing your documents, this field can be queried using just the string you mentioned:</p> <pre><code>from solr import SolrConnection term = "11000060K2" solr_conn = SolrConnection() scoreDocs = solr_conn.si.query(activityemail=term).execute() print scoreDocs.result.docs </code></pre>
    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