Change in query behaviour

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Change in query behaviour

Gerrit Boers
Hi,

I’m testing the current development version of exist (as of this morning) and noticed that queries that worked perfectly in version 2.1 do no longer work. It concerns queries that combine lucene searches with additional predicates.
This no longer works:

let $queryResult := collection(concat($get:strTerminologyData,'/snomed-data/en-GB'))//desc[ft:query(.,$query,$options)][../ancestors/id=$toplevels][@active][../@active]

but if I break it into two pieces it works again:

let $queryResult := collection(concat($get:strTerminologyData,'/snomed-data/en-GB'))//desc[ft:query(.,$query,$options)]
let $result := $queryResult[../ancestors/id=$toplevels][@active][../@active]

Is this a bug? 

Kind regards,

Gerrit

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Change in query behaviour

Wolfgang Meier-2
Hi,

> I’m testing the current development version of exist (as of this morning) and noticed that queries that worked perfectly in version 2.1 do no longer work. It concerns queries that combine lucene searches with additional predicates.

This might be an issue in the query rewriter, which has changed quite a bit in 2.2. Could you provide me a working example?

Wolfgang
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Change in query behaviour

Gerrit Boers
Hi Wolfgang,

I found a way to reproduce the issues with the Shakespeare demo. This works on the demo site and on my local version:

let $query :=
    <query>
        <near slop="20"><term>love</term><near>father</near></near>
    </query>
return //SPEECH[ft:query(., $query)][contains(../TITLE,' ')][../STAGEDIR='Exit']

But when i add indexes:

      
<create qname="TITLE" type="xs:string"/>
      
<create qname="STAGEDIR" type="xs:string"/>

It no longer returns results.

regards,

Gerrit

On 04 Jun 2014, at 16:20, [hidden email] wrote:

Hi,

I’m testing the current development version of exist (as of this morning) and noticed that queries that worked perfectly in version 2.1 do no longer work. It concerns queries that combine lucene searches with additional predicates.

This might be an issue in the query rewriter, which has changed quite a bit in 2.2. Could you provide me a working example?

Wolfgang
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Change in query behaviour

Jens Østergaard Petersen-2
Hi Gerrit,

Wouldn't this be because "TITLE" is used as a qname in the full-text index? Just indexing STAGEDIR does not influence the results returned.

Jens

On 4 Jun 2014 at 18:28:10, Gerrit Boers ([hidden email]) wrote:

Hi Wolfgang,

I found a way to reproduce the issues with the Shakespeare demo. This works on the demo site and on my local version:

let $query :=
    <query>
        <near slop="20"><term>love</term><near>father</near></near>
    </query>
return //SPEECH[ft:query(., $query)][contains(../TITLE,' ')][../STAGEDIR='Exit']

But when i add indexes:

      
<create qname="TITLE" type="xs:string"/>
      
<create qname="STAGEDIR" type="xs:string"/>

It no longer returns results.

regards,

Gerrit

On 04 Jun 2014, at 16:20, [hidden email] wrote:

Hi,

I’m testing the current development version of exist (as of this morning) and noticed that queries that worked perfectly in version 2.1 do no longer work. It concerns queries that combine lucene searches with additional predicates.

This might be an issue in the query rewriter, which has changed quite a bit in 2.2. Could you provide me a working example?

Wolfgang
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Change in query behaviour

Gerrit Boers
Hi Jens,

I just removed the full text index on TITLE and it still does not work.

regards,

Gerrit

On 05 Jun 2014, at 11:15, Jens Østergaard Petersen <[hidden email]> wrote:

Hi Gerrit,

Wouldn't this be because "TITLE" is used as a qname in the full-text index? Just indexing STAGEDIR does not influence the results returned.

Jens

On 4 Jun 2014 at 18:28:10, Gerrit Boers ([hidden email]) wrote:

Hi Wolfgang,

I found a way to reproduce the issues with the Shakespeare demo. This works on the demo site and on my local version:

let $query :=
    <query>
        <near slop="20"><term>love</term><near>father</near></near>
    </query>
return //SPEECH[ft:query(., $query)][contains(../TITLE,' ')][../STAGEDIR='Exit']

But when i add indexes:

      
 <create qname="TITLE" type="xs:string"/>
      
 <create qname="STAGEDIR" type="xs:string"/>

It no longer returns results.

regards,

Gerrit

On 04 Jun 2014, at 16:20, [hidden email] wrote:
Hi,

I’m testing the current development version of exist (as of this morning) and noticed that queries that worked perfectly in version 2.1 do no longer work. It concerns queries that combine lucene searches with additional predicates.

This might be an issue in the query rewriter, which has changed quite a bit in 2.2. Could you provide me a working example?

Wolfgang
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open

------------------------------------------------------------------------------ 
Learn Graph Databases - Download FREE O'Reilly Book 
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today! 
http://p.sf.net/sfu/NeoTech_______________________________________________ 
Exist-open mailing list 
[hidden email] 
https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Change in query behaviour

Jens Østergaard Petersen-2
Hi Gerrit,

Yes, you are right - there is a problem. 

Curiously, a way to get around it is

return //SPEECH[ft:query(., $query)][contains(../*:TITLE,' ')][../STAGEDIR='Exit']

adding a dummy namespace to TITLE. Don't ask me why ….

I had the same problem yesterday, doing something like

//tei:title[@type eq 'main']

which should present no problems, but

//*:title[@type eq 'main']

worked.

Best,

Jens


On 5 Jun 2014 at 11:37:54, Gerrit Boers ([hidden email]) wrote:

Hi Jens,

I just removed the full text index on TITLE and it still does not work.

regards,

Gerrit

On 05 Jun 2014, at 11:15, Jens Østergaard Petersen <[hidden email]> wrote:

Hi Gerrit,

Wouldn't this be because "TITLE" is used as a qname in the full-text index? Just indexing STAGEDIR does not influence the results returned.

Jens

On 4 Jun 2014 at 18:28:10, Gerrit Boers ([hidden email]) wrote:

Hi Wolfgang,

I found a way to reproduce the issues with the Shakespeare demo. This works on the demo site and on my local version:

let $query :=
    <query>
        <near slop="20"><term>love</term><near>father</near></near>
    </query>
return //SPEECH[ft:query(., $query)][contains(../TITLE,' ')][../STAGEDIR='Exit']

But when i add indexes:

      
 <create qname="TITLE" type="xs:string"/>
      
 <create qname="STAGEDIR" type="xs:string"/>

It no longer returns results.

regards,

Gerrit

On 04 Jun 2014, at 16:20, [hidden email] wrote:
Hi,

I’m testing the current development version of exist (as of this morning) and noticed that queries that worked perfectly in version 2.1 do no longer work. It concerns queries that combine lucene searches with additional predicates.

This might be an issue in the query rewriter, which has changed quite a bit in 2.2. Could you provide me a working example?

Wolfgang
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open

------------------------------------------------------------------------------ 
Learn Graph Databases - Download FREE O'Reilly Book 
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today! 
http://p.sf.net/sfu/NeoTech_______________________________________________ 
Exist-open mailing list 
[hidden email] 
https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open