Negative queries

Monday 31 August 2009 9:43:28 pm

Hi.

Acording to SolrQuerySintax page [1], it's possible to do 'negative queries', so you can fetch something that is not 0 for example.

Is this possible with eZFind? i would like to fetch all the contents of a class filtering by an attribute wich value is not 0.

is really easy to fetch all that are 0, but i don't know how to fetch those wich are not 0.

my code looks like

{def $results = fetch('ezfind', 'search', hash(
                                 'query', $query,
                                 'filter', array('myclass/myattr:0')
))}

how can i change this to fetch those wich myattr value is not 0?

Thanks in advance.

[1] http://wiki.apache.org/solr/SolrQuerySyntax

Member since: 31/01/2007

Postings: 209

Replies


0 Thumbs up!

Tuesday 01 September 2009 2:24:26 pm

Actually, if i use

{def $results = fetch('ezfind', 'search', hash(
                                'query', $query,
                                'filter', array('myclass/myattr:[1 TO *])
))}

i get what i want... but still interested on negative queries .

Member since: 31/01/2007

Postings: 209


0 Thumbs up!

Monday 05 October 2009 10:39:05 am

Member since: 07/03/2003

Postings: 698

You must be logged in to post messages in this topic.

Powered by eZ Publish® Content Management System. Copyright © 2009 eZ Systems AS (except where otherwise noted). All rights reserved.