Hello Anand,

please make sure to send all help requests to the mailing list - this
way all users can benefit from it.

At the moment I don't see much potential to improve your query (but I am
no expert on full-text search, so this is merely my opinion). The "all
words" keywords are unnecessary, as you only use one word.

The most important consideration is if the Full-Text Index is actually
applied to your query. You can check by analyzing the query info,
something like "Applying full-text index" should be found. You can find
more information at https://docs.basex.org/wiki/Full-Text#Index_Processing
So, have you created a Full-Text Index? This should definitely be your
first step, as this will certainly boost your performance. You should
also check the query info as suggested and also take a look at the
optimized query plan given by the compiler, as this can point you to
some bottlenecks in your query.

Cheers,
Dirk

On 28/12/13 10:25, Anand Chiney wrote:
> Dear Dirk,
> 
> How are you ?
> 
> Need some help on using ft:search() in following condition, if applicable.
> 
> Following is the structure of XML file. Around 6 GB of articles in 3 XML DBs
> 
> ---
> 
> 
> <Docs>
>   <Doc>
>     <Title name="Speed of Light" author="John Best" />
>     <SDesc>
>       <Summary>
>         <SSum>
>             <Keyword w="Speed of Light"/>
>             Short Summary Text here.
>         </SSum>
>         <LSum>
>             Long Summary.
>         </LSum>
>       </Summary>
>     </SDesc>
>     <LDesc>
>       Complete Description of the Article.
>     </LDesc>
>   </Doc>
>   <Doc>
>     <Title name="Vibration Analysis" author="John Best" />
>     <SDesc>
>       <Summary>
>         <SSum>
>             <Keyword w="Vibration"/>
>             Short Summary Text here.
>         </SSum>
>         <LSum>
>             <P>Long Summary Para 1</P>
>             <P>Long Summary Para 2</P>
>         </LSum>
>       </Summary>
>     </SDesc>
>     <LDesc>
>       Complete Description of the Article.
>     </LDesc>
>   </Doc>
> </Docs>
> 
> Execution of below query is taking around 1 min !!!
> 
> for $db in("Doc1","Doc2", "Doc3")
> for $x in doc($db)/Docs/Doc
> where $x/SDesc/Summary/SSum/Keyword/lower-case(@w) contains text
> "vibration" and ($x/SDesc/Summary/LSum/P/text() contains text "spring" all
> words or SDesc/Summary/SSum/text() contains text "spring" all words)
> return $x/Title/@name
> 
> Can this be queried using ft:search() ? I tried but failed.
> 
> 
> 

-- 
Dirk Kirsten, BaseX GmbH, http://basex.org
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
|   Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle
`-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

Reply via email to