multivalue date field and search

View: New views
4 Messages — Rating Filter:   Alert me  

multivalue date field and search

by Bart Van den Abeele-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I would like to execute next query :
select id, name where documentType = 'sb_dd_Administratie' and $sb_dd_lastModifiedTimes > CurrentDateTime('- 2 days')

$sb_dd_lastModifiedTimes is a multivalue-field.  I get following error :
Received exception from repository server.
Error performing query.
The operator " > " is used between expressions that have no order-relation: "$sb_dd_lastModifiedTimes" and "CurrentDateTime('- 2 days')".

Is there a way to do this?  As soon as the field has a value that meets the condition i want it to be in the resultset.


I also mentioned an other problem about the multivalue-fields a while ago, but dit not get an anwser :

I had i document with a multivalue-field.  It has the values Doc1.png and Test123.jpg.  When i search on Test123.jpg, the document is found.  When i search on Doc1* , it is also found.  But when i search on Test123* it is not found.  Because of the nature of the multivalue-field i would expect that the result is found.  Is there a way to make this work?  I do this search via the fulltext-function.

--
Met vriendelijke groeten,
Bart Van den Abeele
Email: bvda@...
Helpdesk : +32 (09) 389 0560
Persoonlijk : +32 (09) 389 0564

**** DISCLAIMER ****
http://www.schaubroeck.be/maildisclaimer.htm


_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: multivalue date field and search

by Bruno Dumon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Sep 4, 2009 at 9:48 AM, Bart Van den Abeele<bvda@...> wrote:

> Hi,
>
> I would like to execute next query :
> select id, name where documentType = 'sb_dd_Administratie' and
> $sb_dd_lastModifiedTimes > CurrentDateTime('- 2 days')
>
> $sb_dd_lastModifiedTimes is a multivalue-field.  I get following error :
> Received exception from repository server.
> Error performing query.
> The operator " > " is used between expressions that have no order-relation:
> "$sb_dd_lastModifiedTimes" and "CurrentDateTime('- 2 days')".
>
> Is there a way to do this?  As soon as the field has a value that meets the
> condition i want it to be in the resultset.

There is no way to do this right now, but I think it would not be hard
to change it in Daisy so that it works this way. IIRC, the equals
operator already works like this, so it might be a matter of removing
a restriction.

> I also mentioned an other problem about the multivalue-fields a while ago,
> but dit not get an anwser :
>
> I had i document with a multivalue-field.  It has the values Doc1.png and
> Test123.jpg.  When i search on Test123.jpg, the document is found.  When i
> search on Doc1* , it is also found.  But when i search on Test123* it is not
> found.  Because of the nature of the multivalue-field i would expect that
> the result is found.  Is there a way to make this work?  I do this search
> via the fulltext-function.

Have you selected the "Query type: Lucene query" on the fulltext
search page? Or is this via the API?

--
Bruno Dumon
Outerthought ~ http://outerthought.org/
Daisy ~ http://www.daisycms.org/
Kauri ~ http://www.kauriproject.org/
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: multivalue date field and search

by Bart Van den Abeele-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bruno Dumon schreef:
On Fri, Sep 4, 2009 at 9:48 AM, Bart Van den Abeelebvda@... wrote:
  
Hi,

I would like to execute next query :
select id, name where documentType = 'sb_dd_Administratie' and
$sb_dd_lastModifiedTimes > CurrentDateTime('- 2 days')

$sb_dd_lastModifiedTimes is a multivalue-field.  I get following error :
Received exception from repository server.
Error performing query.
The operator " > " is used between expressions that have no order-relation:
"$sb_dd_lastModifiedTimes" and "CurrentDateTime('- 2 days')".

Is there a way to do this?  As soon as the field has a value that meets the
condition i want it to be in the resultset.
    

  
Ok.  For the date-problem i can hold my max en min date and search over them.  That will also work for me.
There is no way to do this right now, but I think it would not be hard
to change it in Daisy so that it works this way. IIRC, the equals
operator already works like this, so it might be a matter of removing
a restriction.

  
I also mentioned an other problem about the multivalue-fields a while ago,
but dit not get an anwser :

I had i document with a multivalue-field.  It has the values Doc1.png and
Test123.jpg.  When i search on Test123.jpg, the document is found.  When i
search on Doc1* , it is also found.  But when i search on Test123* it is not
found.  Because of the nature of the multivalue-field i would expect that
the result is found.  Is there a way to make this work?  I do this search
via the fulltext-function.
    

Have you selected the "Query type: Lucene query" on the fulltext
search page? Or is this via the API?

  
I build my daisy-ql with a String and execute it via the api.

**** DISCLAIMER ****
http://www.schaubroeck.be/maildisclaimer.htm


_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

Re: multivalue date field and search

by Bruno Dumon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Sep 4, 2009 at 11:05 AM, Bart Van den Abeele<bvda@...> wrote:
[snip]

>
> I also mentioned an other problem about the multivalue-fields a while ago,
> but dit not get an anwser :
>
> I had i document with a multivalue-field.  It has the values Doc1.png and
> Test123.jpg.  When i search on Test123.jpg, the document is found.  When i
> search on Doc1* , it is also found.  But when i search on Test123* it is not
> found.  Because of the nature of the multivalue-field i would expect that
> the result is found.  Is there a way to make this work?  I do this search
> via the fulltext-function.
>
>
> Have you selected the "Query type: Lucene query" on the fulltext
> search page? Or is this via the API?
>
>
>
> I build my daisy-ql with a String and execute it via the api.
>

Ah yes, since the Doc1* does work, the query is surely executed as a
Lucene query.

It is strange it doesn't work. Are you sure it does not give an
exception either? Have you tried re-saving the document (with some
change in it, otherwise it doesn't get reindexed)?

You can debug this sort of thing by using the Luke tool to inspect
your Lucene index:

http://www.getopt.org/luke/

Just run it, point it to your repodata/indexstore directory, go to the
search tab, enter "content:test123*" as query, choose the
StandardAnalyzer on the right, click Update, click on the rewrite tab,
and it should list all the terms in the index that start with test123.
You should see test123.jpg among these.

--
Bruno Dumon
Outerthought ~ http://outerthought.org/
Daisy ~ http://www.daisycms.org/
Kauri ~ http://www.kauriproject.org/
_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy