Hi all!
In one requirement of alfresco share 3.4.4 I need to implement the Advance Search by Size. How can I do it. Until now I have done the following. In share-config.xml
<config evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<forms>
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
<form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
[b]<form labelId="Search By Size" descriptionId="Search by size">cm:content</form>[/b] <!– Mine –>
</forms>
</advanced-search>
</config>
<config evaluator="model-type" condition="cm:content">
<forms>
<form id="search">
<field-visibility>
<!– <show id="kb:ilLevelOne" /> –>
<show id="mimetype" />
<show id="cm:categories" force="true"/>
<show id="size" />
</field-visibility>
<appearance>
<field id="mimetype" label="Document Type">
<control template="/org/alfresco/components/form/controls/mimetype.ftl" />
</field>
<field id="cm:categories" label="Document Category">
<control>
<control-param name="compactMode">true</control-param>
</control>
</field>
<field id="size" label="Document Size">
<control template="/org/alfresco/components/form/controls/numberrange.ftl" />
</field>
</appearance>
</form>
</forms>
</config>
The size box has been shown but when size given it returns zero result and if I leave the size empty then it works properly.My query log when I search using the size parameters is(TYPE:"cm:content" AND (cm:content.size-range:"0|500003") AND (television )) AND -TYPE:"cm:thumbnail"Caused by: NoViableAltException(45@[455:1: ftsTest : ( ( ftsFieldGroupProximity )=> ftsFieldGroupProximity -> ^( PROXIMITY ftsFieldGroupProximity ) | ftsTerm ( ( fuzzy )=> fuzzy )? -> ^( TERM ftsTerm (
fuzzy )? ) | ftsExactTerm ( ( fuzzy )=> fuzzy )? -> ^( EXACT_TERM ftsExactTerm ( fuzzy )? ) | ftsPhrase ( ( slop )=> slop )? -> ^( PHRASE ftsPhrase ( slop )? ) | ftsExactPhrase ( ( slop )=> slop )? ->
^( EXACT_PHRASE ftsExactPhrase ( slop )? ) | ftsTokenisedPhrase ( ( slop )=> slop )? -> ^( PHRASE ftsTokenisedPhrase ( slop )? ) | ftsSynonym ( ( fuzzy )=> fuzzy )? -> ^( SYNONYM ftsSynonym ( fuzzy )?
) | ftsRange -> ^( RANGE ftsRange ) | ftsFieldGroup -> ftsFieldGroup | LPAREN ftsDisjunction RPAREN -> ftsDisjunction | template -> template );])
Please help
Thanking you!