I am trying to find a Solr instance with Solr.Net . I have a body field that is defined in the schema as:
<field name="body" type="text_general" indexed="true" stored="true" omitNorms="true"/>
text_general uses solr.StandardTokenizerFactory in the schema and is defined as:
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> <!-- in this example, we will only use synonyms at query time <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/> --> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" /> <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType>
(I did not change anything with this type of field, this is the one I got with the default solr setting)
I am trying to query records for the search query LISTBU5.RCV , it returns me results containing LISTBU4.RCV . How:
Items left on queue: \\111.11.11.11\Lists\SAVELIST\ABC2\LISTBU4.RCV
False Result: The number at the end of the search query is different
My code for the request:
SolrQueryByField solrQuery = new SolrQueryByField("body", searchTerm); var result = solr.Query(solrQuery, new SolrNet.Commands.Parameters.QueryOptions { Rows = 100, // Start = 0, OrderBy = new[] { new SortOrder("ID", Order.DESC) }, });
But if I use Text Query, for example:
SolrQuery solrQuery = new SolrQuery("(body:" + "\"" + searchTerm + "\")");
It returns accurate results. I know that creating a text query is not recommended in Solr.Net , but what should I do?
I am using SolrNet.dll version 0.4.0.2002 with the version of Solr Instance 4.4.0 .
user2711965
source share