I suppose the title says it all - I have a site that I'm using Acquia's Apachesolr on and I'd like to use the elevate.xml to push results to the top based on a keyword. Can I do this?

CommentFileSizeAuthor
#10 1105528-1.patch620 bytesNick_vh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

Sounds like you need to open a support ticket with Acquia, if the question is specific to the service?

tomdisher’s picture

I'm not sure that it is. The file seems to be standard for all apachesolr servers. I'm not sure.

pwolanin’s picture

Yes, it's a server side file. Do you have direct access to the servers to modify the file?

jpmckinney’s picture

Status: Active » Postponed (maintainer needs more info)
tomdisher’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

You are correct, it is a bottleneck of using Acquia. It seems they don't allow you to use it at this time. Thanks for the reply!

yxor_75us’s picture

I am trying to use elevate.xml with Drupal Apachesolr module on Drupal 6, I am not seeing any support for elevate.xml using /select url. If i change the url to /elevate, elevated results appear, but then lot of other apachesolr functionality is broken.
Anyone has working examples or solutions i can use?

Thanks in advance.

yxor_75us’s picture

Any help on how to use query elevation(elevate.xml) with apache solr module on drupal 6?

mherchel’s picture

@yxor_75us -

This took me several days to figure out, but if you have access to your server's solrconfig.xml, you can set the default request handler to use the elevate component (QueryElevationComponent).

To do this, you'll need to find the default request handler (use this to find http://wiki.apache.org/solr/SolrRequestHandler).

Within this module's solrconfig.xml, the default handler is called "partitioned" and occurs at or around lines 458-504.

You'll need to add <str>elevator</str> into <arr name="last-components"> at the end (line 503 for me). The end result should look like this:

  <requestHandler name="partitioned" class="solr.SearchHandler" default="true">
    <lst name="defaults">
     <str name="defType">dismax</str>
     <str name="echoParams">explicit</str>
     <bool name="omitHeader">true</bool>
     <float name="tie">0.01</float>
     <str name="qf">
        body^40.0 title^5.0 name^3.0 taxonomy_names^2.0 tags_h1^5.0 tags_h2_h3^3.0 tags_h4_h5_h6^2.0 tags_inline^1.0
     </str>
     <str name="pf">
        body^2.0
     </str>
     <int name="ps">15</int>
     <!-- Abort any searches longer than 4 seconds -->
     <!-- <int name="timeAllowed">4000</int>  -->
     <str name="mm">
        2&lt;-35%
     </str>
     <str name="q.alt">*:*</str>

   <!-- example highlighter config, enable per-query with hl=true -->
     <str name="hl">true</str>
     <str name="hl.fl">body</str>
     <int name="hl.snippets">3</int>
     <str name="hl.mergeContiguous">true</str>
   <!-- instructs Solr to return the field itself if no query terms are
        found -->
     <str name="f.body.hl.alternateField">body</str>
     <str name="f.body.hl.maxAlternateFieldLength">256</str>
     <!-- JS: I wasn't getting good results here... I'm turning off for now
     because I was getting periods (.) by themselves at the beginning of
     snippets and don't feel like debugging anymore.  Without the regex is
     faster too -->
     <!--<str name="f.body.hl.fragmenter">regex</str>--> <!-- defined below -->

    <!-- By default, don't spell check -->
      <str name="spellcheck">false</str>
    <!-- Defaults for the spell checker when used -->
      <str name="spellcheck.onlyMorePopular">true</str>
      <str name="spellcheck.extendedResults">false</str>
      <!--  The number of suggestions to return -->
      <str name="spellcheck.count">1</str>
    </lst>
    <arr name="last-components">
      <str>spellcheck</str>
      <str>elevator</str>	  
    </arr>
  </requestHandler>

Good luck!

Nick_vh’s picture

Project: Apache Solr Search » Apache Solr Common Configurations
Version: 6.x-2.x-dev »
Issue summary: View changes

Moving

Nick_vh’s picture

Status: Closed (works as designed) » Needs review
FileSize
620 bytes
Nick_vh’s picture

Committed and named the schema and config solr drupal-4.3-3.x and 4.x

Nick_vh’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.