09-23-2009 11:59 AM
10-07-2009 10:47 AM
10-07-2009 02:22 PM
<property name="xxx:filename_property">
<description>Untokenised filename used by Lucene queries</description>
<type>d:text</type>
<mandatory>true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
10-08-2009 09:39 AM
I encountered the same issue. Only after understanding how Lucene indexes, will you find out that characters such as underscore, dashes, etc. are not included.
One possible solution is to add a custom property on the node (of the content item) to capture the file name and tell Lucene not to tokenize this field. It would look as such:
<property name="xxx:filename_property">
<description>Untokenised filename used by Lucene queries</description>
<type>d:text</type>
<mandatory>true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<tokenised>false</tokenised>
</index>
</property>
Please confirm if this works.
10-08-2009 12:01 PM
10-16-2009 05:29 AM
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
</index>
When you create new content this will be applied. if you want it to be applied to the old content you'll have to reïndex alfresco.10-20-2009 08:42 AM
Hi,
Did you try this?When you create new content this will be applied. if you want it to be applied to the old content you'll have to reïndex alfresco.<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
</index>
Thats what ive done. And it worked fine.
Regards
10-27-2009 05:04 AM
<property name="cm:name">
<title>Name</title>
<type>d:text</type>
<mandatory enforced="true">true</mandatory>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>both</tokenised>
</index>
<constraints>
<constraint ref="cm:filename" />
</constraints>
</property>
10-27-2009 05:36 AM
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
// Create a query object, looking for all items with alfresco in the name of text
Query query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/app:company_home/cm:" + searchText + "\"");
// Execute the query
final Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
QueryResult queryResult = repositoryService.query(STORE, query, false);
// Display the results
ResultSet resultSet = queryResult.getResultSet();
ResultSetRow[] rows = resultSet.getRows();
searchText
searchText
10-27-2009 12:01 PM
Hi,
Can anyone help me out ..
I am using web service to search a file in alfresco repository, here's the code:
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
// Create a query object, looking for all items with alfresco in the name of text
Query query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/app:company_home/cm:" + searchText + "\"");
// Execute the query
final Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
QueryResult queryResult = repositoryService.query(STORE, query, false);
// Display the results
ResultSet resultSet = queryResult.getResultSet();
ResultSetRow[] rows = resultSet.getRows();
I am passing file name without extension assearchText
for ex:
Suppose i have two files File1.txt and file1.pdf and i want to search both the files just by passing file1 as mysearchText
I tried the same thing, query returns nothing. And when I tried searching as File1.txt, query returns the exact file.
What could be the possible modification I should do with the above query to get my expected result.
Any suggestion appreciated
Thanks in advance
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.