<?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 Lucene search in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/lucene-search/m-p/127386#M89609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to search for documents with particular keyword. I tried xpath but it would search only in the document names and not content. I tried Lucene but it would just return the node path and not the actual documents that contain the keywords.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Following are the queries for both that I am using.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Workspace workspace = session.getWorkspace();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;QueryManager queryManager = workspace.getQueryManager();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Query query = queryManager.createQuery("//app:company_home/m8:HomePage/*[contains('weather')]", Query.XPATH);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SearchParameters searchParameters = new SearchParameters();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;searchParameters.addStore(storeRef);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;searchParameters.setLanguage(SearchService.LANGUAGE_LUCENE);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;String query = "PATH:\"/app:*/m8:*//*\" +TEXT:\"TWENTYFOURHRPRECIP\"";&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Oct 2007 00:40:56 GMT</pubDate>
    <dc:creator>pjain1</dc:creator>
    <dc:date>2007-10-02T00:40:56Z</dc:date>
    <item>
      <title>Lucene search</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-search/m-p/127386#M89609</link>
      <description>I am trying to search for documents with particular keyword. I tried xpath but it would search only in the document names and not content. I tried Lucene but it would just return the node path and not the actual documents that contain the keywords.Following are the queries for both that I am using.W</description>
      <pubDate>Tue, 02 Oct 2007 00:40:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-search/m-p/127386#M89609</guid>
      <dc:creator>pjain1</dc:creator>
      <dc:date>2007-10-02T00:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Lucene search</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-search/m-p/127387#M89610</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;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;SearchParameters searchParameters = new SearchParameters(); &lt;BR /&gt;StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore"); &lt;BR /&gt;searchParameters.addStore(storeRef); &lt;BR /&gt;searchParameters.setLanguage(SearchService.LANGUAGE_LUCENE); &lt;BR /&gt;&lt;BR /&gt;String query = "PATH:\"/app:*/m8:*//*\" +TEXT:\"TWENTYFOURHRPRECIP\"";&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Should work ….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"TEXT:\"TWENTYFOURHRPRECIP\""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on its own, and &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"PATH:\"/app:*/m8:*//*\" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on its own.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You query says the text match is required and the PATH optional (it will just improve the score)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"+PATH:\"/app:company_home/m8:HomePage//*\" +TEXT:\"TWENTYFOURHRPRECIP\""&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your XPATH should also work - you may have meant&amp;nbsp; ……HomePage//*[……]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 14:55:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-search/m-p/127387#M89610</guid>
      <dc:creator>andy</dc:creator>
      <dc:date>2007-10-16T14:55:58Z</dc:date>
    </item>
  </channel>
</rss>

