cancel
Showing results for 
Search instead for 
Did you mean: 

SOLR FTSQueryException unknown property

3acascia
Champ in-the-making
Champ in-the-making
Hi All,
I modified my aspect adding a new property but I cannot search using this property because I get the following exception.

2013-03-26 14:46:59,896  ERROR [solr.servlet.SolrDispatchFilter] [http-bio-8443-exec-8] org.alfresco.repo.search.impl.parsers.FTSQueryException: 02260007 Unknown property:
   at org.alfresco.repo.search.impl.parsers.AlfrescoFunctionEvaluationContext.getLuceneFieldName(AlfrescoFunctionEvaluationContext.java:400)
   at org.alfresco.repo.search.impl.querymodel.impl.lucene.functions.LuceneFTSPhrase.addComponent(LuceneFTSPhrase.java:79)
   at org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneFunctionalConstraint.addComponent(LuceneFunctionalConstraint.java:58)
   at org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneConjunction.addComponent(LuceneConjunction.java:70)
   at org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneConjunction.addComponent(LuceneConjunction.java:70)
   at org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneConjunction.addComponent(LuceneConjunction.java:70)
   at org.alfresco.repo.search.impl.querymodel.impl.lucene.LuceneQuery.buildQuery(LuceneQuery.java:111)
   at org.alfresco.solr.AlfrescoSolrDataModel.getFTSQuery(AlfrescoSolrDataModel.java:1110)
   at org.alfresco.solr.query.AlfrescoFTSQParserPlugin$AlfrescoFTSQParser.parse(AlfrescoFTSQParserPlugin.java:81)
   at org.apache.solr.search.QParser.getQuery(QParser.java:131)
   at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89)
   at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
   at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
   at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
   at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
   at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)


How can I force the registration of this new property?
Any help is appreciated.
Toma
4 REPLIES 4

andy
Champ on-the-rise
Champ on-the-rise
Hi

The new property definition will be pulled over to SOLR at the start of the next sync.

Andy

3acascia
Champ in-the-making
Champ in-the-making
Hi Andy,
thank you for your reply.
In particular, I've added "mandatory" option in an existing property.
Is SOLR able to make sync in this case too?

Thanks in advances,
Toma

jpfi
Champ in-the-making
Champ in-the-making
no, why should Solr know if your prop is mandatory or not?

andy
Champ on-the-rise
Champ on-the-rise
Hi

SOLR will pull new models at the start of the sync.
It will also try and update any existing models.
Some model changes are not allowed as they make no sense.
eg. changing the data type of a property, making an optional property mandatory

If there are model changes like the above SOLR will reject them and put them in a warning list.

You can force them in if you delete the existing version of the updated model held be the SOLR core.
For some changes you need to build the index again (changes to data type(if you patch them on DB etc)).

See the CMIS 1.1 draft spec for a wider discussion of what you can expect to do when changing properties and types. Although not quite the Alfresco way it will give the right idea.

Hope this helps

Andy