4teamwork / ftw.solr

Solr integration for Plone
5 stars 5 forks source link

Solr connection in solr.cfg #62

Open mbaechtold opened 8 years ago

mbaechtold commented 8 years ago

IMHO, the <connection> should be placed outside of <settings>in https://github.com/4teamwork/ftw.solr/blob/master/ftw/solr/profiles/default/solr.xml#L4

Here's a config I have exported from a recent project:

<?xml version="1.0"?>
<object name="solr">
 <connection>
  <active value="True"/>
  <host value="127.0.0.1"/>
  <port value="8983"/>
  <base value="/solr"/>
 </connection>
 <settings>
  <async value="False"/>
  <auto-commit value="True"/>
  <commit-within value="10000"/>
  <index-timeout value="0.0"/>
  <search-timeout value="0.0"/>
  <max-results value="10000000"/>
  <required-query-parameters>
   <parameter name="SearchableText"/>
   <parameter name="qt"/>
  </required-query-parameters>
  <search-pattern
     value="+(Title:{value}^100 OR Description:{value}^20 OR SearchableText:{value}^10 OR SearchableText:{value_lwc} OR SearchableText:{value_twc} OR searchwords:{value}^10000) +showinsearch:True OR path_parents:/bern.ch/platform/themen/^500"/>
  <search-facets>
   <parameter name="portal_type"/>
   <parameter name="review_state"/>
   <parameter name="site_area"/>
  </search-facets>
  <filter-query-parameters>
   <parameter name="portal_type"/>
  </filter-query-parameters>
  <slow-query-threshold value="0"/>
  <effective-steps value="1"/>
  <exclude-user value="False"/>
  <highlight_fields/>
  <highlight_formatter_pre value="["/>
  <highlight_formatter_post value="]"/>
  <highlight_fragsize value="100"/>
  <field-list/>
  <levenshtein_distance value="0.0"/>
  <atomic_updates value="True"/>
 </settings>
</object>
mbaechtold commented 8 years ago

What do you think, @lukasgraf or @maethu?

lukasgraf commented 8 years ago

@mbaechtold I agree, that's also how the original config in collective.solr is structured.

However, because getElementsByTagName() works recursively, the parsing of the XML config in collective.solr probably still works I would assume.