[Spellfix] Inexplicable discrepancy concerning query results

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

[Spellfix] Inexplicable discrepancy concerning query results

Adamek, Jochen (CQTN)
Hello,

using the spellfix<https://www.sqlite.org/spellfix1.html>-functionality in SQLite, I realized, that in Python, the following query leads to different results compared to the direct execution with SQLite.

Code fragment in Python:
....
qS = "select * from pf where word MATCH 'ro:|z@nStr|?a|s@' and scope=8 and rank=14";
cS = connection.execute(qS)
....

This leads to:
ro:|z=n|StY|k6|ve:k
raI|C=n|StaI|n6|ho:f
ro:|z=n|Stra:|s@

When I execute the same query directly with  SQLite, I get the following result:

ro:|z=n|Stra:|s@
re:|z=n|Stra:|s@
rOY|z=n|Stra:|s@

The first 4 rows have a different score and a different distance. This discrepancy occurs with most example queries. But changing the scope value of the query in my Python code, it changes the result, so it is not the case, that SQLite does not process the scope operation via the Python-SQLite interface.

Any idea?

Kind regards

Jochen Adamek




_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: [Spellfix] Inexplicable discrepancy concerning query results

Stephan Beal-3
On Thu, Jul 21, 2016 at 10:54 AM, Adamek, Jochen (CQTN) <
[hidden email]> wrote:

> The first 4 rows have a different score and a different distance. This
> discrepancy occurs with most example queries. But changing the scope value
> of the query in my Python code, it changes the result, so it is not the
> case, that SQLite does not process the scope operation via the
> Python-SQLite interface.
>
> Any idea?
>

It sounds to me like your python and local sqlite shell are using different
sqlite versions.


--
----- stephan beal
http://wanderinghorse.net/home/stephan/
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: [Spellfix] Inexplicable discrepancy concerning query results

Adamek, Jochen (CQTN)
Yes, you are right. I am using an older SQLite version in Python: 3.8.6.

I will update and check that.

Thanks.

-----Urspr√ľngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Stephan Beal
Gesendet: Donnerstag, 21. Juli 2016 10:57
An: SQLite mailing list
Betreff: Re: [sqlite] [Spellfix] Inexplicable discrepancy concerning query results

On Thu, Jul 21, 2016 at 10:54 AM, Adamek, Jochen (CQTN) <
[hidden email]> wrote:

> The first 4 rows have a different score and a different distance. This
> discrepancy occurs with most example queries. But changing the scope value
> of the query in my Python code, it changes the result, so it is not the
> case, that SQLite does not process the scope operation via the
> Python-SQLite interface.
>
> Any idea?
>

It sounds to me like your python and local sqlite shell are using different
sqlite versions.


--
----- stephan beal
http://wanderinghorse.net/home/stephan/
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users