cancel
Showing results for 
Search instead for 
Did you mean: 

Help with FTS query language case insensitive search

Renesto
Champ on-the-rise
Champ on-the-rise

Hello

I have a Query in CMIS that i want to be Case-Insensitive:

TYPE:"aa:document" AND =cm:creator:exampleuser AND (@aafi:recipient:"example")

@aafi:recipient is my custom Index Field in Solr (Datatype Text)

How do i Convert @aafi:recipient:"example" into FTS Query Syntax ?

I've tried "CONVERT(cm:name:aafirecipient=example)" and a lot of things but either i just get every Document returned or an Error from SOLR. Maybe someone can help me with this one?

4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator

I don't quite understand where your problem lies. The query

TYPE:"aa:document" AND =cm:creator:exampleuser AND aafi:recipient:example

would already be a FTS query for a term and would be executed in a case insensitive manner on the SOLR side of things provided your field is defined to be indexed in the content model.

I am not sure of where you found the CONVERT example - I have never seen something like this with regards to Alfresco SOLR or CMIS/FTS query conversions.

kaynezhang
World-Class Innovator
World-Class Innovator

TYPE:'aa:document' AND =cm:creator:exampleuser AND aafi:recipient:'example'

Please refer to https://docs.alfresco.com/6.0/concepts/rm-searchsyntax-intro.html

 But this query is not Case-insensitive for me. Am i missing any settings or something else ?

kaynezhang
World-Class Innovator
World-Class Innovator

You should set tokenised to true or both in your aafi:recipient property definition .

In order to make the already existing nodes work ,you also need to rebuild your index

				<property name="aafi:recipient">
					<title>****</title>
					<description>****</description>
					<type>d:text</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<atomic>true</atomic>
						<stored>false</stored>
						<tokenised>both</tokenised>
						<facetable>true</facetable>
					</index>
				</property>