AnsweredAssumed Answered

Lucene Query

Question asked by pascal on Apr 4, 2006
Latest reply on Apr 6, 2006 by pascal

I'm currently working at a C# Project using web services.
I created 2 custom attributes:

- language (text)
- type  (text)

I'd like to search all the documents that are from a specified document type.

This code snippet returns me all the documents that are from type "KT-HT":

// Create a query object, looking for all items with alfresco in the name of text

RepositoryService.Query query = new RepositoryService.Query();
query.language = RepositoryService.QueryLanguageEnum.lucene;

query.statement = "@my\\:type:'KT-HT'";

// Execute the query
QueryResult queryResult = this.repoService.query(this.spacesStore, query, false);
But if I want tu use wildcards in the query statement like this:

query.statement = "@my\\:type:'KT*'";

I get an empty resultset.

Any clue of what I am doing wrong would be greatly appreciated.

Thanks a lot.