Unable to work with eXist's search functions

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

Unable to work with eXist's search functions

John Preimonas-2
HI,

I have tried to run your kwic examples and they all do not work for me.
I have even tried the Xquery example in 

XQuery/Keyword Search

and again it fails.

I created the following, and it too does not function:

xquery version "3.0";
import module namespace kwic="http://exist-db.org/xquery/kwic"
at "resource:org/exist/xquery/lib/kwic.xql";
declare option exist:serialize "method=xhtml media-type=text/html";

let $scope :=
    (
        collection('/db/apps/gliding/modules/data/flights')/log,
        collection('/db/apps/gliding/modules/data/expenses')/expense
    )

    for $hit in $scope[ft:query(., “‘more’”)] (: I know I have used the word ‘more’ in a number of log/comments elements :)
    let $keyword-matches := text:match-count($hit)
    let $hit-node-length := string-length($hit)
    let $score := $keyword-matches div $hit-node-length
    order by $score descending
    return 
        kwic:summarize($hit, <config width=“40"/>)


I also tried the following code:
let $search-string := concat('$scope', '[. &amp;= "', $filtered-q, '"]')
let $hits := util:eval($search-string)
let $sorted-hits :=
    for $hit in $hits
    let $keyword-matches := text:match-count($hit)
    let $hit-node-length := string-length($hit)
    let $score := $keyword-matches div $hit-node-length
    order by $score descending
    return $hit

and it appears the util:eval function does not work for me either. I just end up with cannot compile null values found, etc.
Can you please help. I am beginning to get frustrated with eXist-db & myself.
Regards,
John


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unable to work with eXist's search functions

Alister Pillow-3
How have you configured the index?
Could you show us?



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unable to work with eXist's search functions

John Preimonas-2
I haven't set up any indexing yet.

Sent from my iPad

> On 15 May 2015, at 8:52 pm, Alister Pillow <[hidden email]> wrote:
>
> How have you configured the index?
> Could you show us?
>
>

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unable to work with eXist's search functions

Alister Pillow-3
Creating an index will be the first step. If you’re running eXist locally, please visit
http://localhost:8080/exist/apps/doc/lucene.xml
and review the documentation there.

This is a fairly complex subject so you’ll need to spend some time reading that page.

I’d suggest creating an index on /db/apps/gliding/modules/data

Once you have created an index, you’ll need to ensure that the existing collection is re-indexed.
You can do that from the Dashboard by clicking Collections and then navigating to
/db/apps/gliding/modules/data and then click the Reindex button (the second one in the toolbar).

Finally, I suggest testing the ft:query before trying to use the kwic module.

Regards,
Alister.

> On 15 May 2015, at 9:36 pm, John Preimonas <[hidden email]> wrote:
>
> I haven't set up any indexing yet.
>
> Sent from my iPad
>
>> On 15 May 2015, at 8:52 pm, Alister Pillow <[hidden email]> wrote:
>>
>> How have you configured the index?
>> Could you show us?
>>
>>


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unable to work with eXist's search functions

Joe Wicentowski
Also, please consider the code on that wikibooks page on Keyword Search out of date.  It's useful for outlining an approach to Google-style keyword search, but the code itself may not compile on the latest builds of eXist.  (Specifically, I see that the "text" module is used.)

Sent from my iPad

> On May 15, 2015, at 8:35 AM, Alister Pillow <[hidden email]> wrote:
>
> Creating an index will be the first step. If you’re running eXist locally, please visit
> http://localhost:8080/exist/apps/doc/lucene.xml
> and review the documentation there.
>
> This is a fairly complex subject so you’ll need to spend some time reading that page.
>
> I’d suggest creating an index on /db/apps/gliding/modules/data
>
> Once you have created an index, you’ll need to ensure that the existing collection is re-indexed.
> You can do that from the Dashboard by clicking Collections and then navigating to
> /db/apps/gliding/modules/data and then click the Reindex button (the second one in the toolbar).
>
> Finally, I suggest testing the ft:query before trying to use the kwic module.
>
> Regards,
> Alister.
>
>> On 15 May 2015, at 9:36 pm, John Preimonas <[hidden email]> wrote:
>>
>> I haven't set up any indexing yet.
>>
>> Sent from my iPad
>>
>>> On 15 May 2015, at 8:52 pm, Alister Pillow <[hidden email]> wrote:
>>>
>>> How have you configured the index?
>>> Could you show us?
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unable to work with eXist's search functions

Loren Cahlander
Since I have been doing work on my own use of search, I will submit an update to the wikibook page.

Sent from my iPad

> On May 15, 2015, at 8:42 AM, Joe Wicentowski <[hidden email]> wrote:
>
> Also, please consider the code on that wikibooks page on Keyword Search out of date.  It's useful for outlining an approach to Google-style keyword search, but the code itself may not compile on the latest builds of eXist.  (Specifically, I see that the "text" module is used.)
>
> Sent from my iPad
>
>> On May 15, 2015, at 8:35 AM, Alister Pillow <[hidden email]> wrote:
>>
>> Creating an index will be the first step. If you’re running eXist locally, please visit
>> http://localhost:8080/exist/apps/doc/lucene.xml
>> and review the documentation there.
>>
>> This is a fairly complex subject so you’ll need to spend some time reading that page.
>>
>> I’d suggest creating an index on /db/apps/gliding/modules/data
>>
>> Once you have created an index, you’ll need to ensure that the existing collection is re-indexed.
>> You can do that from the Dashboard by clicking Collections and then navigating to
>> /db/apps/gliding/modules/data and then click the Reindex button (the second one in the toolbar).
>>
>> Finally, I suggest testing the ft:query before trying to use the kwic module.
>>
>> Regards,
>> Alister.
>>
>>> On 15 May 2015, at 9:36 pm, John Preimonas <[hidden email]> wrote:
>>>
>>> I haven't set up any indexing yet.
>>>
>>> Sent from my iPad
>>>
>>>> On 15 May 2015, at 8:52 pm, Alister Pillow <[hidden email]> wrote:
>>>>
>>>> How have you configured the index?
>>>> Could you show us?
>>
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> _______________________________________________
>> Exist-open mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open