<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to build lucene query with OR using search context? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269222#M222352</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;'OR' condition is being called by default unless 'AND' condition is being called by force. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check the svn code for SearchContext object at &lt;/SPAN&gt;&lt;A href="http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/web-client/source/java/org/alfresco/web/bean/search/SearchContext.java" rel="nofollow noopener noreferrer"&gt;http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/web-client/source/java/org/alfresco/web/bean/search/SearchContext.java&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; /**&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * @return Returns if AND is forced between text terms. False (OR terms) is the default.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; public boolean getForceAndTerms()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return this.forceAndTerms;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Mar 2013 13:11:42 GMT</pubDate>
    <dc:creator>sliaw</dc:creator>
    <dc:date>2013-03-14T13:11:42Z</dc:date>
    <item>
      <title>How to build lucene query with OR using search context?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269216#M222346</link>
      <description>In Search Context there is a method addAttributeQuery(QName qname, String value).This creates search query with AND.Is there any way I can add OR query in search context?Suppose I have one property test1:name and another attribute test2:name.I want to search name property with respect to test1:name</description>
      <pubDate>Mon, 08 Oct 2012 11:48:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269216#M222346</guid>
      <dc:creator>anujs86</dc:creator>
      <dc:date>2012-10-08T11:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to build lucene query with OR using search context?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269217#M222347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to use the SearchParameter object and SearchService if you are using JAVA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also for javascript you need to user the SearchService.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 13:05:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269217#M222347</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2012-10-08T13:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to build lucene query with OR using search context?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269218#M222348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you be bit more clear how can I use it in Search Context?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 13:26:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269218#M222348</guid>
      <dc:creator>anujs86</dc:creator>
      <dc:date>2012-10-08T13:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to build lucene query with OR using search context?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269219#M222349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In Search Context there is a method addAttributeQuery(QName qname, String value).&lt;BR /&gt;This creates search query with AND.&lt;BR /&gt;&lt;BR /&gt;Is there any way I can add OR query in search context?&lt;BR /&gt;&lt;BR /&gt;Suppose I have one property test1:name and another attribute test2:name.&lt;BR /&gt;I want to search name property with respect to test1:name as well as test2:name.&lt;BR /&gt;&lt;BR /&gt;I can do it by writing lucene query and get the results. But I have to do it via Search Context.&lt;BR /&gt;&lt;BR /&gt;Let me know if its possible as i do not see any method in SearchContext.java to take OR query.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone has any idea??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 11:40:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269219#M222349</guid>
      <dc:creator>anujs86</dc:creator>
      <dc:date>2012-10-16T11:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to build lucene query with OR using search context?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269220#M222350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;look here for info about SearchService &lt;/SPAN&gt;&lt;A href="http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Frm-searchsyntax-APIs.html" rel="nofollow noopener noreferrer"&gt;http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Frm-searchsyntax-APIs.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;You can define a query using SearchService.LANGUAGE_FTS_ALFRESCO and a template as descibed here &lt;/SPAN&gt;&lt;A href="http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Frm-searchsyntax-APIs.html" rel="nofollow noopener noreferrer"&gt;http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Frm-searchsyntax-APIs.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrea&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 11:56:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269220#M222350</guid>
      <dc:creator>abarisone</dc:creator>
      <dc:date>2012-10-16T11:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to build lucene query with OR using search context?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269221#M222351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Andrea.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want information on SearchContext as it has already been used and I cannot change it at this point of time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to know whether we can add OR query using SearchContext.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 14:07:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269221#M222351</guid>
      <dc:creator>anujs86</dc:creator>
      <dc:date>2012-10-16T14:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to build lucene query with OR using search context?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269222#M222352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;'OR' condition is being called by default unless 'AND' condition is being called by force. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check the svn code for SearchContext object at &lt;/SPAN&gt;&lt;A href="http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/web-client/source/java/org/alfresco/web/bean/search/SearchContext.java" rel="nofollow noopener noreferrer"&gt;http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/web-client/source/java/org/alfresco/web/bean/search/SearchContext.java&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; /**&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * @return Returns if AND is forced between text terms. False (OR terms) is the default.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; public boolean getForceAndTerms()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return this.forceAndTerms;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 13:11:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-build-lucene-query-with-or-using-search-context/m-p/269222#M222352</guid>
      <dc:creator>sliaw</dc:creator>
      <dc:date>2013-03-14T13:11:42Z</dc:date>
    </item>
  </channel>
</rss>

