cancel
Showing results for 
Search instead for 
Did you mean: 

Some Lucene searching questions

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

I noticed in SearchContext#buildQuery() that one of the possible Lucene query terms is of type "TEXT:queryString".  What exactly does this search? The text of which property?  Or all text, irrespective of where it may occur?

Now that content is a property, can I search inside a repository object's content with a query like "@escapedQname:singleWordQuery"?  What happens when an object's content is binary (e.g., a PDF / .doc file)?

I am indexing my cms:asset's content property using:

                <property name="cms:content">
                    <type>d:content</type>
                    <mandatory>false</mandatory>
                    <index enabled="true">
                        <atomic>true</atomic>
                        <stored>false</stored>
                        <tokenised>true</tokenised>
                    </index>
                </property>

Will the "@escapedQname:singleWordQuery" type of query search for words inside the content?

Thanks.  I hope I wasn't too vague :-).
2 REPLIES 2

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

In short, the answer is yes.

Appologies, the docs for this are on my list to do very soon.

The TEXT field in the index accumulates a full text index for ALL content.
Individual content is also indexed and searchable by attribute name.
So any attribute of type content will be indexed under its attribute name, so long as there was some conversion from the content type to text.
So PDF conent should be fine if a PDF to text conversion is found.

The LuceneTest.java file has a couple of examples.

Not too vague at all !

Regards

Andy

hsjawanda
Champ in-the-making
Champ in-the-making
So PDF conent should be fine if a PDF to text conversion is found.

These converters are already part of the Alfresco code-base, right?  content-services-context.xml is the configuration file?