cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene range query in Node browser

rutvim
Champ in-the-making
Champ in-the-making

I am trying to search for an XML within a range of its parent tags using Lucene search in the node browser. I am using the following syntax:  childTagName: ["<parentTagName>" TO "</parentTagName>"] but I am unable to achieve the range. Any alternate ways to implement this?

7 REPLIES 7

afaust
Legendary Innovator
Legendary Innovator

I am not sure I fully understand what you are trying to do or if the use case for Lucene range queries is clear to you. With Lucene you can do metadata and full text searches on your content in Alfresco. Range queries are only used for metadata searches, i.e. search for documents created between X and Y dates, or between A and B bytes of size. You cannot search for text ranges (XML content is just text) that way.

rutvim
Champ in-the-making
Champ in-the-making

So is there any way in which XML content can be searched for within a range or an order? Like lets say I have words "alpha", "beta" and "gamma" in my content and I wish to look for "beta" only if it is present between "alpha" and "gamma". If not Lucene, can any other search criteria accomplish this?

afaust
Legendary Innovator
Legendary Innovator

You can do "phrase queries" with Lucene that may be able to answer your inquiries with a certain degree of reliability. Google-style proximity searching is supported - see the documentation for it.

But real, semantics-respecting XML queries are not supported at all.

rutvim
Champ in-the-making
Champ in-the-making

Thank you for your suggestion. Does Alfresco have any alternative to XQueries?

afaust
Legendary Innovator
Legendary Innovator

Alfresco with the default out-of-the-box setup supports neither XQuery nor any alternative to it. This is a feature that may be added by extension / customization.

rutvim
Champ in-the-making
Champ in-the-making

Since I am new to Alfresco, can you suggest a further path that I may take to achieve this? I read about Lux (Lux: The XML Search Engine ) but I am not sure of what path to undertake. Thank you for your valuable inputs.

afaust
Legendary Innovator
Legendary Innovator

It would be good to understand why you chose Alfresco for this task. Do you only need it to serve this particular use case or are there other use cases why you want to use it / already use it? Because if it is just for this use case of searching in some XML files, without the need for any common document management features, Alfresco may be ill suited.

The only further path I can suggest at this point would be to contact a service provider that deals with Alfresco extensions / customizations and discuss with them what you want/need and how it could be achieved. As someone who is new to Alfresco, you will (very likely) not be able to add new search capabilities using a different search engine (one that allows you to semantically query XML file contents) to Alfresco without outside help.