lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claire Pollard <claire.poll...@imagen.io>
Subject RE: Edismax ignoring queries containing booleans
Date Mon, 06 Jan 2020 13:46:37 GMT
Ok... It doesn't work for me. I'm fairly new to Solr so any help would be appreciated!

My managed-schema field and field type look like this:

<field name="recordID" type="long" indexed="true" stored="true" required="true" multiValued="false"
/>
<fieldType name="long" class="solr.LongPointField" sortMissingLast="true" omitNorms="true"
/>

And my solrconfig.xml select/query handlers look like this:

	<requestHandler name="/select" class="solr.SearchHandler">
		<lst name="defaults">
			<str name="echoParams">all</str>
			<!-- Query settings -->
			<str name="defType">edismax</str>
			<str name="qf">
				&#x09;text^0.4 recordID^10.0 annotations^0.5 collectionTitle^1.9 collectionDescription^0.9
title^2.0 Test_FR^1.0 Test_DE^1.0 Test_AR^1.0 genre^1.0 genre_fr^1.0 french2^1.0&#x0D;&#x0A;
			</str>
			<str name="df">text</str>
			<str name="q.alt">*:*</str>
			<str name="rows">10</str>
			<str name="fl">*,score</str>
			<str name="pf">
				&#x09;text^0.2 recordID^10.0 annotations^0.6 collectionTitle^2.0 collectionDescription^1.0
title^2.1 Test_FR^1.1 Test_DE^1.1 Test_AR^1.1 genre^1.1 genre_fr^1.1 french2^1.1&#x0D;&#x0A;</str>
			<str name="bf" />
			<str name="mm">&#x0D;&#x0A;       0&lt;1 2&lt;-1 5&lt;-2 6&lt;90%&#x0D;&#x0A;
     </str>
			<int name="ps">100</int>
			<!--SpellChecking -->
			<str name="df">text</str>
			<!-- Solr will use suggestions from both the 'default' spellchecker
     and from the 'wordbreak' spellchecker and combine them.
     collations (re-written queries) can include a combination of
     corrections from both spellcheckers -->
			<str name="spellcheck.dictionary">default</str>
			<str name="spellcheck.dictionary">wordbreak</str>
			<str name="spellcheck">on</str>
			<str name="spellcheck.extendedResults">true</str>
			<str name="spellcheck.count">10</str>
			<str name="spellcheck.alternativeTermCount">5</str>
			<str name="spellcheck.maxResultsForSuggest">5</str>
			<str name="spellcheck.collate">true</str>
			<str name="spellcheck.collateExtendedResults">true</str>
			<str name="spellcheck.maxCollations">5</str>
		</lst>
		<arr name="last-components">
			<str>spellcheck</str>
		</arr>
		<!-- In addition to defaults, "appends" params can be specified
         to identify values which should be appended to the list of
         multi-val params from the query (or the existing "defaults").
      -->
	</requestHandler>

	<requestHandler name="/query" class="solr.SearchHandler">
		<lst name="defaults">
			<str name="echoParams">explicit</str>
			<str name="wt">json</str>
			<str name="indent">true</str>
			<str name="df">text</str>
		</lst>
	</requestHandler>

Is there anything else that might be useful in helping diagnose what's going wrong for me?

Cheers,
Claire.

-----Original Message-----
From: Saurabh Sharma <saurabh.infoedge@gmail.com> 
Sent: 06 January 2020 11:20
To: solr-user@lucene.apache.org
Subject: Re: Edismax ignoring queries containing booleans

It should work well. I have just tested the same with 8.3.0.

Thanks
Saurabh Sharma

On Mon, Jan 6, 2020, 4:31 PM Claire Pollard <claire.pollard@imagen.io>
wrote:

> I'm using:
>
> recordID:(18 OR 19 OR 20)
>
> Which should return 2 records (as 18 doesn't exist), but it returns none.
> recordID is a LongPointField (sorry I said Int in my previous message).
>
> -----Original Message-----
> From: Saurabh Sharma <saurabh.infoedge@gmail.com>
> Sent: 06 January 2020 10:35
> To: solr-user@lucene.apache.org
> Subject: Re: Edismax ignoring queries containing booleans
>
> Please share the query which you are creating.
>
> On Mon, Jan 6, 2020, 3:52 PM Claire Pollard <claire.pollard@imagen.io>
> wrote:
>
> > In Solr 8.3.0 I've got an edismax query parser in my search handler, 
> > and it seems to be ignoring Boolean operators such as AND and OR 
> > when searching using an IntPointField.
> >
> > I was hoping to use a query to this field to return a batch of 
> > documents with non-sequential IDs, so a range would be inappropriate.
> >
> > We had a previous 4.10.2 instance of Solr which uses the now 
> > deprecated Trie fields, and these seem to search without issue using
> boolean operators.
> >
> > Is there something extra I need to do with my setup for PointFields 
> > to use booleans or should they work as default.
> >
> > Cheers,
> > Claire.
> >
>
Mime
View raw message