<?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 doesnÃ‚Â´t work after uploading a file in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/lucene-search-doesn%C3%A3-%C3%A2-t-work-after-uploading-a-file/m-p/125899#M88603</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;IÃ‚Â´m trying to find .doc files in a Alfresco folder with JavaScript after the user uploads a new file into this folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The process is quite simple:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- the user uploads a new file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- javascript searches for old files&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- if there is any file found, they shall be moved into an archive folder&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IÃ‚Â´m trying to do these search with Lucene but it is not working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After I upload the file, following error message is displayed:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Die Operation Transaction didn't commit: Failed to execute script 'workspace://SpacesStore/f5b9d977-7a42-11dc-a3bd-0fbb90973a69': TypeError: Cannot read property "@cm\:name:*doc" from undefined (AlfrescoScript#3) hat einen Systemfehler verursacht.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I was wondering, if the problem is in the query syntax or in the fact, that the LuceneSearch tryes to read properties from the uploaded file and then&amp;nbsp; collapses, like the Failure message says "Cannot read property".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody have any idea???&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the problem is the syntax, what is the right way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my Javascript code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// check if it is any .doc file in the folder already&lt;BR /&gt;// if there is one, move it to temp&lt;BR /&gt;var nodes = space.childrenByLuceneSearch["@cm\\:name:*doc"]; // &amp;lt;= IT DOESN`T WORK&lt;BR /&gt;var tempNode = parent.childByNamePath("temp");&lt;BR /&gt;&lt;BR /&gt;for (var i=0; i &amp;lt; nodes.length; i++)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (tempNode != null)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nodes[i].move(tempNode);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;// check if it is a "last_transformed.html" file in the folder already&lt;BR /&gt;var lastfile = space.childByNamePath("last_transformed.html");&lt;BR /&gt;var transformed = document.transformDocument("text/html", space);&lt;BR /&gt;&lt;BR /&gt;if (lastfile == null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lastfile = space.createFile("last_transformed.html");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;lastfile.content = transformed.content;&lt;BR /&gt;transformed.remove();&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Oct 2007 14:43:13 GMT</pubDate>
    <dc:creator>weggyboy</dc:creator>
    <dc:date>2007-10-14T14:43:13Z</dc:date>
    <item>
      <title>Lucene Search doesnÃ‚Â´t work after uploading a file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-search-doesn%C3%A3-%C3%A2-t-work-after-uploading-a-file/m-p/125899#M88603</link>
      <description>Hi!IÃ‚Â´m trying to find .doc files in a Alfresco folder with JavaScript after the user uploads a new file into this folder.The process is quite simple:- the user uploads a new file- javascript searches for old files- if there is any file found, they shall be moved into an archive folderIÃ‚Â´m tryin</description>
      <pubDate>Sun, 14 Oct 2007 14:43:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-search-doesn%C3%A3-%C3%A2-t-work-after-uploading-a-file/m-p/125899#M88603</guid>
      <dc:creator>weggyboy</dc:creator>
      <dc:date>2007-10-14T14:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Lucene Search doesnÃ‚Â´t work after uploading a file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-search-doesn%C3%A3-%C3%A2-t-work-after-uploading-a-file/m-p/125900#M88604</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;SPAN&gt;IÃ‚Â´ve solved the problem without luceneSearch()…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes is better to keep things simple.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks anyway!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 09:28:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-search-doesn%C3%A3-%C3%A2-t-work-after-uploading-a-file/m-p/125900#M88604</guid>
      <dc:creator>weggyboy</dc:creator>
      <dc:date>2007-10-15T09:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Lucene Search doesnÃ‚Â´t work after uploading a file</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-search-doesn%C3%A3-%C3%A2-t-work-after-uploading-a-file/m-p/125901#M88605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are not using the JavaScript API correctly - the childrenByLucene[] call is FreeMarker API call - in JavaScript you use the search object instead:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API#Search_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/JavaScript_API#Search_API&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2007 09:50:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-search-doesn%C3%A3-%C3%A2-t-work-after-uploading-a-file/m-p/125901#M88605</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2007-10-23T09:50:11Z</dc:date>
    </item>
  </channel>
</rss>

