text:fuzzy-match-any

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

text:fuzzy-match-any

Giuseppe Corrarello
Hi,
how i must specify a list of keyword in parameter $b of the function

text:fuzzy-match-any($a as node*, $b as xs:string, ...) node*

for a full text search ?

Reply | Threaded
Open this post in threaded view
|

Re: text:fuzzy-match-any

Adam Retter-7

multiple strings can be specified using -

("string1", "string2", "string3")


On Thu, 2005-10-13 at 15:34 +0100, Giuseppe Corrarello wrote:
> Hi,
> how i must specify a list of keyword in parameter $b of the function
>
> text:fuzzy-match-any($a as node*, $b as xs:string, ...) node*
>
> for a full text search ?
>


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: text:fuzzy-match-any

Евгений-8
Adam Retter wrote:

>multiple strings can be specified using -
>
>("string1", "string2", "string3")
>
>
>On Thu, 2005-10-13 at 15:34 +0100, Giuseppe Corrarello wrote:
>  
>
>>Hi,
>>how i must specify a list of keyword in parameter $b of the function
>>
>>text:fuzzy-match-any($a as node*, $b as xs:string, ...) node*
>>
>>for a full text search ?
>>
>>    
>>
>
>
>  
>
and  text:fuzzy-match-all too?


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: text:fuzzy-match-any

Giuseppe Corrarello
In reply to this post by Adam Retter-7
Im trying to execute this query:

text:fuzzy-match-any(/book//chapter//formalpara//para,"subject","object")
where "subject" and "object" are my two string to search but the result is:

org.xmldb.api.base.XMLDBException: cannot convert string 'object' into a double

    at org.exist.xmldb.RemoteXPathQueryService.throwException(RemoteXPathQueryService.java:80)

    at org.exist.xmldb.RemoteXPathQueryService.query(RemoteXPathQueryService.java:56)

    at org.exist.xmldb.RemoteXPathQueryService.query(RemoteXPathQueryService.java:36)

    at org.exist.xmldb.RemoteXPathQueryService.execute(RemoteXPathQueryService.java:208)

    at org.exist.client.QueryDialog$QueryThread.run(QueryDialog.java:397)

Caused by: org.exist.xquery.XPathException: cannot convert string 'object' into a double

    at org.exist.xmldb.RemoteXPathQueryService.throwException(RemoteXPathQueryService.java:79)

    ... 4 more

Caused by: org.exist.xquery.XPathException: cannot convert string 'object' into a double

    at org.exist.xmldb.RemoteXPathQueryService.throwException(RemoteXPathQueryService.java:79)

    at org.exist.xmldb.RemoteXPathQueryService.query(RemoteXPathQueryService.java:56)

    at org.exist.xmldb.RemoteXPathQueryService.query(RemoteXPathQueryService.java:36)

    at org.exist.xmldb.RemoteXPathQueryService.execute(RemoteXPathQueryService.java:208)

    at org.exist.client.QueryDialog$QueryThread.run(QueryDialog.java:397)


wat's wrong ?

On 10/13/05, Adam Retter <[hidden email]> wrote:

multiple strings can be specified using -

("string1", "string2", "string3")


On Thu, 2005-10-13 at 15:34 +0100, Giuseppe Corrarello wrote:
> Hi,
> how i must specify a list of keyword in parameter $b of the function
>
> text:fuzzy-match-any($a as node*, $b as xs:string, ...) node*
>
> for a full text search ?
>

Reply | Threaded
Open this post in threaded view
|

Re: text:fuzzy-match-any

Pierrick Brihaye-2
Hi,

Giuseppe Corrarello wrote:

> Im trying to execute this query:
>
> text:fuzzy-match-any(/book//chapter//formalpara//para,"subject","object")
> where "subject" and "object" are my two string to search but the result is:
>
> org.xmldb.api.base.XMLDBException: cannot convert string 'object' into a
> double

> Caused by: org.exist.xquery.XPathException: cannot convert string
> 'object' into a double

> wat's wrong ?

The docs (as well as the code itself) are somewhat misleading. As
reported by the error message, the third argument, if any, is expected
to be a double, which is a threshold value.

The second argument is expected to be a single string.

[snip]

Cheers,

--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire
DRAC Bretagne
mailto:[hidden email]
+33 (0)2 99 29 67 78


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: text:fuzzy-match-any

Giuseppe Corrarello
Correct but if i want to specify a list of keyword in parameter $b of the function

text:fuzzy-match-any($a as node*, $b as xs:string, ...) node*

how can i do?


On 10/14/05, Pierrick Brihaye <[hidden email]> wrote:
Hi,

Giuseppe Corrarello wrote:

> Im trying to execute this query:
>
> text:fuzzy-match-any(/book//chapter//formalpara//para,"subject","object")
> where "subject" and "object" are my two string to search but the result is:
>
> org.xmldb.api.base.XMLDBException: cannot convert string 'object' into a
> double

> Caused by: org.exist.xquery.XPathException: cannot convert string
> 'object' into a double

> wat's wrong ?

The docs (as well as the code itself) are somewhat misleading. As
reported by the error message, the third argument, if any, is expected
to be a double, which is a threshold value.

The second argument is expected to be a single string.

[snip]

Cheers,

--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire
DRAC Bretagne
mailto:[hidden email]
+33 (0)2 99 29 67 78

Reply | Threaded
Open this post in threaded view
|

Re: text:fuzzy-match-any

Pierrick Brihaye-2
Giuseppe Corrarello wrote:
> Correct but if i want to specify a list of keyword in parameter $b of
> the function
>
> text:fuzzy-match-any($a as node*, $b as xs:string, ...) node*
>
> how can i do?

Err... use XPath operators ?

text:fuzzy-match-any(//SPEECH,"love") intersect
text:fuzzy-match-any(//SPEECH,"crown")

text:fuzzy-match-any(//SPEECH,"love") |
text:fuzzy-match-any(//SPEECH,"crown")

text:fuzzy-match-any(//SPEECH,"love") except
text:fuzzy-match-any(//SPEECH,"crown")

[long snip]

Cheers,

--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire
DRAC Bretagne
mailto:[hidden email]
+33 (0)2 99 29 67 78


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: text:fuzzy-match-any

Giuseppe Corrarello
Many thanks for your help,
now all seems all right !!!

On 10/14/05, Pierrick Brihaye <[hidden email]> wrote:
Giuseppe Corrarello wrote:
> Correct but if i want to specify a list of keyword in parameter $b of
> the function
>
> text:fuzzy-match-any($a as node*, $b as xs:string, ...) node*
>
> how can i do?

Err... use XPath operators ?

text:fuzzy-match-any(//SPEECH,"love") intersect
text:fuzzy-match-any(//SPEECH,"crown")

text:fuzzy-match-any(//SPEECH,"love") |
text:fuzzy-match-any(//SPEECH,"crown")

text:fuzzy-match-any(//SPEECH,"love") except
text:fuzzy-match-any(//SPEECH,"crown")

[long snip]

Cheers,

--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire
DRAC Bretagne
mailto:[hidden email]
+33 (0)2 99 29 67 78

Reply | Threaded
Open this post in threaded view
|

Re: text:fuzzy-match-any

Leif-Jöran Olsson
In reply to this post by Pierrick Brihaye-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pierrick Brihaye skrev:

> Giuseppe Corrarello wrote:
>
>> Correct but if i want to specify a list of keyword in parameter $b of
>> the function
>>
>> text:fuzzy-match-any($a as node*, $b as xs:string, ...) node*
>>
>> how can i do?
>
>
> Err... use XPath operators ?
>
> text:fuzzy-match-any(//SPEECH,"love") intersect
> text:fuzzy-match-any(//SPEECH,"crown")
>
> text:fuzzy-match-any(//SPEECH,"love") |
> text:fuzzy-match-any(//SPEECH,"crown")
>
> text:fuzzy-match-any(//SPEECH,"love") except
> text:fuzzy-match-any(//SPEECH,"crown")

This function must fixed then to work in analgy to the fn:match-any()
and should take a list of strings as second argument. Otherwise the
function name is missleading and the function is useless.

Leif-Jöran

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDT15MhcIn5aVXOPIRAi3wAKCYiAy8rq8kKUygoXncRR0G7CgzIQCeKb3+
Horl7ZLCsCPtqpsReb2wpZ4=
=y1wi
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open