Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Apache Solr: Lessons Learned

Apache Solr: Lessons Learned

Lessons learned when working with (a custom version of) Solr for 3 years

Jeroen Rosenberg

June 11, 2013
Tweet

More Decks by Jeroen Rosenberg

Other Decks in Technology

Transcript

  1. <field name="id" type="string" indexed="true" stored="true" required=" true" multiValued="false"/> <field name="name"

    type="string" indexed="false" stored="true" required="true" multiValued="false"/> Field type definition
  2. <field name="id" type="string" indexed="true" stored="true" required=" true" multiValued="false"/> <field name="name"

    type="string" indexed="false" stored="true" required="true" multiValued="false"/> Field type definition
  3. ... <fieldtype name="pdate" class="solr.DateField" sortMissingLast="true"/> ... <field name="date" type="pdate" indexed="false"

    stored="true"/> <field name="range_date" type="pdate" indexed="true" stored="false"/> <copyField source="date" dest="range_date"/> Field type definition
  4. ... <fieldtype name="pdate" class="solr.DateField" sortMissingLast="true"/> ... <field name="date" type="pdate" indexed="false"

    stored="true"/> <field name="range_date" type="pdate" indexed="true" stored="false"/> <copyField source="date" dest="range_date"/> Field type definition
  5. <requestHandler name="distributedSearch" class="solr.SearchHandler" default="false"> <lst name="defaults"> <int name="rows">10</int> <str name="fl">*</str>

    <bool name="partialResults">true</bool> <str name="shards">solr2:7070/solr/foo,solr3:7070/solr/foo</str> </lst> </requestHandler> Distributed search config
  6. <requestHandler name="distributedSearch" class="solr.SearchHandler" default="false"> <lst name="defaults"> <int name="rows">10</int> <str name="fl">*</str>

    <bool name="partialResults">true</bool> <str name="shards">solr2:7070/solr/foo,solr3:7070/solr/foo</str> </lst> </requestHandler> Distributed search config
  7. <requestHandler name="distributedSearch" class="solr.SearchHandler" default false"> <lst name="defaults"> <int name="rows">10</int> <str

    name="fl">*</str> <bool name="partialResults">true</bool> <str name="shards">solr2:7070/solr/foo,solr3:7070/solr/foo</str> </lst> </requestHandler> Distributed search config
  8. q=*:*&fq=country:AN&fq=duration:[1 TO *]& fq=date:[NOW TO 2013-07-01T00:00:00Z] Range query with wildcard

    fq=duration:[1 TO *] range query using DateMath syntax fq=date:[NOW TO 2013-07-01T00:00:00Z]