AnsweredAssumed Answered

Advanced Search - using multiple content types (custom+TEXT)

Question asked by milko on Oct 24, 2011
Hi.  I'm trying to make a custom search for my working simple content model.  The problem is that I want to search for a date in my metadata date field AND also search the document content (using TEXT).  When I select "Search" on my advanced search custom form, it seems to do an OR when applying the search, so the resulting document list will show all documents containing the text I want regardless of whether or not they fall into my date range plus all documents in my date range whether they contain my text to search for or not.  So, under-the-hood it is doing an OR instead of an AND for my advanced search form that mixes id TEXT with my:date1.

Here is my search form (my custom content model is omitted due to it's simplicity):
   <config evaluator="model-type" condition="mk:mktype">
      <forms>
         <form id="search">
            <field-visibility>
               <show id="mk:date1" />
               <show id="TEXT" />
            </field-visibility>
            <appearance>
                <set id="myset" appearance="bordered-panel" label="My Search Params" />
                <field id="mk:date1" label="Custom Metadata Datefield 1" set="myset">
                  <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               </field>
               <field id="TEXT" label="Document Content To Find" set="myset">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>


Can someone help or point me to some code, post, or documentation which would explain what needs to change in order for my search to achieve it's goal?

I've looked around quite a bit in online doc and thru posts and couldn't find anything on this topic.

I'm new to Alfresco and using Community v3.4.d and doing this in Share.

milko

Outcomes