<?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: Lucene Searches involving the dash (-) character in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/lucene-searches-involving-the-dash-character/m-p/307596#M260726</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;very likely this is the result of tokenisation during indexing and searching. The dash character is a natural place to perform tokenisation. Since the tokens "RFT", "TS" and "16" are contained in the result it is returned - even if you have the token "16" twice in your search. To look for exact matches, the query should likely use =@cm:name:"RFT-TS-16-16". I strongly advise to NOT use legacy luceneSearch anymore and instead opt for query() with search language fts-alfresco. The lucene language has various drawbacks, especially that it doesn't support the "transactional metadata query" feature added in 4.2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 21 Aug 2016 20:14:15 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2016-08-21T20:14:15Z</dc:date>
    <item>
      <title>Lucene Searches involving the dash (-) character</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-searches-involving-the-dash-character/m-p/307595#M260725</link>
      <description>I'm doing some queries and processing using the Javascript Console and I've run into some trouble when my search term includes a dash (-) character.&amp;nbsp; Here's a simplified example:var rfx = 'RFT-TS-16-16';var results = search.luceneSearch("@cm\\:name:\"" + rfx + "\"");What I would like are matches whe</description>
      <pubDate>Fri, 19 Aug 2016 14:00:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-searches-involving-the-dash-character/m-p/307595#M260725</guid>
      <dc:creator>niele</dc:creator>
      <dc:date>2016-08-19T14:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Lucene Searches involving the dash (-) character</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-searches-involving-the-dash-character/m-p/307596#M260726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;very likely this is the result of tokenisation during indexing and searching. The dash character is a natural place to perform tokenisation. Since the tokens "RFT", "TS" and "16" are contained in the result it is returned - even if you have the token "16" twice in your search. To look for exact matches, the query should likely use =@cm:name:"RFT-TS-16-16". I strongly advise to NOT use legacy luceneSearch anymore and instead opt for query() with search language fts-alfresco. The lucene language has various drawbacks, especially that it doesn't support the "transactional metadata query" feature added in 4.2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Aug 2016 20:14:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-searches-involving-the-dash-character/m-p/307596#M260726</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2016-08-21T20:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lucene Searches involving the dash (-) character</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-searches-involving-the-dash-character/m-p/307597#M260727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks so much for the quick response and suggestions.&amp;nbsp; I'm now using search.query with fts-alfresco and it's working perfectly with wildcards:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var searchObj = {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;query: 'PATH:"/app:company_home/st:sites/cm:grey-county/cm:documentLibrary//*" AND @cm\:name:"*RFT-TS-16-16*"',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;language: 'fts-alfresco'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var results = search.query(searchObj);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2016 14:52:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-searches-involving-the-dash-character/m-p/307597#M260727</guid>
      <dc:creator>niele</dc:creator>
      <dc:date>2016-08-22T14:52:19Z</dc:date>
    </item>
  </channel>
</rss>

