cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene searching question

hsjawanda
Champ in-the-making
Champ in-the-making
Given a node's id, how can I get its Lucene-path (i.e., a string that I can use in a Lucene "PATH:x" query)?

I am having trouble with a lucene query which includes TYPE and PATH fields that used to work fine (or at least as I expected it to work 🙂 ) before upgrading from PR6 to v1.0.  For example:

+TYPE:"{http://www.alacre.com/cms/content-model-1.0}project" AND PATH:"app:company_home//*/cms:lost"

works, but the following doesn't:

+TYPE:"{http://www.alacre.com/cms/content-model-1.0}project" AND PATH:"app:company_home//*/cms:get lost"

I thought maybe it was because of the space in "get lost", which I replaced with "_", but it still doesn't work.

I am confused: in bootstrapped data, which properties determine the name of a node as used in a Lucene path query?
4 REPLIES 4

andy
Champ on-the-rise
Champ on-the-rise
Hi

There has been a change that will affect this query.

The PATH field now matches what would be required in XPATH.
Your query would not be a valid XPATH as it contains a space.

Characters not allowed in XML element names are encoded using ISO9075.

So you would need:


+TYPE:"{http://www.alacre.com/cms/content-model-1.0}project" AND PATH:"app:company_home//*/cms:get_x0020_lost"

A restricted set of characters were all mapped to _ which was wrong.

The nodeService can be used to get Path objects which give the correct path via toString()

Cheers

Andy

hsjawanda
Champ in-the-making
Champ in-the-making
Hi,

Is searching in the TEXT field the same as searching inside a content property?  Basically, if I am already searching on

TEXT:"access*"

do I need to search on:

@\{http\://www.alfresco.org/model/content/1.0\}content:'access*"

A comment in SearchContext.java refers to using the "TEXT" field as doing a full text search. What does this full text include and where is this configured?

Thanks,

andy
Champ on-the-rise
Champ on-the-rise
Hi

TEXT is a combined index of all content properties.
So you just need to search TEXT in the case you describe.

The individual properties are there for when you do not want to search all content attributes.

Regards

Andy

cyman
Champ in-the-making
Champ in-the-making
Sorry for refreshing such an old topic, but I'm chasing down an issue with the search functionality and the last entry in this topic troubles me somehow:

TEXT is a combined index of all content properties.
Can somebody confirm whether this still applies to the current version (3.2)?

I have a custom metadata property (called "additionalComments") which shall also be searchable through the fulltext search. I could solve this for the simple search (upper-right-corner) by adding the following configuration:

   <config>
      <client>
         <simple-search-additional-attributes>
            <qname>{http://www.alfresco.org/model/content/1.0}description</qname>
            <qname>{http://www.alfresco.org/model/content/1.0}title</qname>
            <qname>{my.model}additionalComments</qname>
         </simple-search-additional-attributes>
      </client>
   </config>

However this does not affect the TEXT (Look forSmiley Happy field on the Advanced Search page. If the information above was still correct, I would assume that no additional configuration should be needed.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.