solr - Alfresco 5.0 transactional queries -


i have questions how index in alfresco 1 works transactional queries.

  1. we use alfresco 5.0.2 , in documentation can read this: "when upgrading database, can add optional indexes in order support metadata query feature."

suppose in model.xml add custom property this:

 <type name="doc:mydoc">  <title>document</title>  <parent>cm:content</parent>  <properties>    <property name="doc:level">           <title>level</title>                                                                          <type>d:text</type>      <mandatory>true</mandatory>      <index enabled="true">         <atomic>true</atomic>         <stored>false</stored>         <tokenised>both</tokenised>      </index>    </property>    ...       </properties> </type>                 

and have on alfresco-global.properties these sets

solr.query.cmis.queryconsistency=transactional_if_possible solr.query.fts.queryconsistency=transactional_if_possible system.metadata-query-indexes.ignored=false   

my first question is... how alfresco knows properties want index on db? read model.xml , index indexed properties specify there? index custom properties? or need create script add these new indexes?

i read script metadata-query-indexes.sql don't understand how rewrite in order add new index property. if it's necessary script, give me example doc:mydoc property wrote before, please?

  1. another question query syntax isn't supported db , goes directly solr.

i read path, site, ancestor, or, d:content, d:boolean or d:any (among others) properties in query or not executable against db. don't understand d:content exactly.

for example, query (based on custom property written before) type:whatever , @doc\:level:"value" considered d:content? query supported bd or goes solr?

  1. i read this:

"any property checks must expressed in form means "identical value check" querying db not provide same tokenization / similarity capabilities solr index. e.g. instead of my:property:"value" you'd have use =my:property:"value" , "value" must written in proper case value stored in db."

this means if use =, example doing =@doc\:level:"value", query isn't accepted on db , goes solr? can't search exact value on db?

i've been researching tmqs recently. i'm assuming need transactionality, why tmq queries interesting. queries via solr consistent, tmqs return change. there applications eventual consistency huge problem, i'm assuming why looking them.

alfresco says use tmqs default, , in limited testing (200k documents), found no appreciable performance difference between solr , tmq query. can't imagine horrible performance if alfresco set default style, need further testing millions of documents sure. of course depend on database load. if database bottleneck , don't need transactionality, consider using @ syntax in metadata searches avoid them, or disable them via properties configuration.

1) how alfresco knows properties want index on db? read model.xml , index indexed properties specify there? index custom properties? or need create script add these new indexes?

when execute query using syntax compatible tmq, alfresco so. default behavior "transactional_if_possible": http://docs.alfresco.com/4.2/concepts/intrans-metadata-configure.html

you not have have field marked indexable in model work. unclear documentation i've tried disabling indexing field in model , these queries still work. don't have have solr running!

2) question query syntax isn't supported db , goes directly solr.

your example of type , attribute not go solr. it's things path must go solr.

3) "any property checks must expressed in form means "identical value check" querying db not provide same tokenization / similarity capabilities solr index. e.g. instead of my:property:"value" you'd have use =my:property:"value" , "value" must written in proper case value stored in db."

what saying must use = operator, not default or @ operator. @ operator depends on tokenization, tmqs go straight database. however, can use * in attribute if omit "", so:

=cm:\title:startswith*

works me on 5.0.2 vía tmq. can absolutely search exact value however.

i hope cleared you. highly recommend putting solr.query.fts.queryconsistency=transactional force tmqs in test evironment , testing different queries if still have questions syntax supported.

regards


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -