You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Maciej <mg...@gmail.com> on 2010/07/15 17:07:57 UTC

XML results ranking

Hello,

I'm a newbie to Lucene and before starting playing with it I would like 
to know whether it fits to my application.

I have a collection of XML documented demarcated with respect to a 
stable XML schema (WSDL definitions).

I wonder whether Lucene:

(1) provides full-text search over content of XML elements ?

(2) provides substring search over values of attributes of XML elements ?

(3) scores relevance of matching XML documents ?

(4) allows to identify (in matching document) XML elements with matched 
query terms and than navigate to parental/children nodes in XML 
?structure ?

(5) provides a way to give more weight to some XML element types during 
relevance scoring ?


Best regards,
Maciej Gawinecki


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: XML results ranking

Posted by henok sahilu <he...@yahoo.com>.
you just have to write a parser that parse each sections of the XML document. 
and these documents will be indexed as a separate informational units . then the 
lucene ranking algorithm can over these separate sections.
i can give the codes doing this thing
henok 
good day to you 



----- Original Message ----
From: Ian Lea <ia...@gmail.com>
To: java-user@lucene.apache.org
Sent: Fri, July 16, 2010 1:40:14 AM
Subject: Re: XML results ranking

Hi


If you google "Lucene xml" you'll find info, but I'll attempt to
answer your questions below

> ...
> I wonder whether Lucene:
>
> (1) provides full-text search over content of XML elements ?

Yes.  If you index the content, lucene will let you search over it.

> (2) provides substring search over values of attributes of XML elements ?

Yes, there is wildcard support.  Or use something like n-grams.

> (3) scores relevance of matching XML documents ?

Yes.

> (4) allows to identify (in matching document) XML elements with matched
> query terms and than navigate to parental/children nodes in XML ?structure ?

Not really.

> (5) provides a way to give more weight to some XML element types during
> relevance scoring ?

Yes.  See boosting.


Lucene is a library that doesn't index XML directly, but you can write
code to parse your XML and feed it into lucene, specifying which
fields you want indexed and which stored for later retrieval.


--
Ian.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


      

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: XML results ranking

Posted by Ian Lea <ia...@gmail.com>.
Hi


If you google "Lucene xml" you'll find info, but I'll attempt to
answer your questions below

> ...
> I wonder whether Lucene:
>
> (1) provides full-text search over content of XML elements ?

Yes.  If you index the content, lucene will let you search over it.

> (2) provides substring search over values of attributes of XML elements ?

Yes, there is wildcard support.  Or use something like n-grams.

> (3) scores relevance of matching XML documents ?

Yes.

> (4) allows to identify (in matching document) XML elements with matched
> query terms and than navigate to parental/children nodes in XML ?structure ?

Not really.

> (5) provides a way to give more weight to some XML element types during
> relevance scoring ?

Yes.  See boosting.


Lucene is a library that doesn't index XML directly, but you can write
code to parse your XML and feed it into lucene, specifying which
fields you want indexed and which stored for later retrieval.


--
Ian.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: XML results ranking

Posted by mark harwood <ma...@yahoo.co.uk>.
Lucene 2454 includes an example of matching logic that  respects the structure 
in XML documents (see (https://issues.apache.org/jira/browse/LUCENE-2454 )
The example class TestNestedDocumentQuery queries xhtml marked up with hResume 
syntax.

We don't have XQuery syntax support in a parser now (and may never) but you may 
find the "NestedDocumentQuery" class useful in moving Lucene away from "flat" 
documents to representing richer structures like XML.




----- Original Message ----
From: Maciej <mg...@gmail.com>
To: java-user@lucene.apache.org
Sent: Thu, 15 July, 2010 16:07:57
Subject: XML results ranking

Hello,

I'm a newbie to Lucene and before starting playing with it I would like to know 
whether it fits to my application.

I have a collection of XML documented demarcated with respect to a stable XML 
schema (WSDL definitions).

I wonder whether Lucene:

(1) provides full-text search over content of XML elements ?

(2) provides substring search over values of attributes of XML elements ?

(3) scores relevance of matching XML documents ?

(4) allows to identify (in matching document) XML elements with matched query 
terms and than navigate to parental/children nodes in XML ?structure ?

(5) provides a way to give more weight to some XML element types during 
relevance scoring ?


Best regards,
Maciej Gawinecki


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


      

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org