Hello,
  My objective is to be able to boost certain fields while allowing
wildcards.  Currently, I am doing this by checking if the user query has
wildcards, and if yes then setting q.alt to be the user query and query to
"".
When I do the search vio*, I get the correct results, but no highlighting.

When I search lu*n I get the correct results with highlighting.

When I search l*n, I get a 500 Internal Server Error.

Any help figuring out why some queries work and others don't would be
greatly appreciated.
Thanks,
Rebecca

I am using ruby with solr.

solrServer = Solr::Connection.new(SOLR_URL);
    highlighting = { :field_list => ['a', 'b', 'c'],
      :max_snippets => 1, :fragment_size => @snippet_size, :prefix => "<b>",
:suffix => "</b>" }

    queryOptions =  {:start => startOffset, :rows => @per_page,
:highlighting => highlighting }

    filterQueries = []
    @filters.each_pair {|key, value| filterQueries.push(key.to_s+':'+value)
unless value.blank? }
    queryOptions[:filter_queries] = filterQueries unless
filterQueries.empty?

    queryOptions[:query_fields] = "a^5 b c^1000"
    queryOptions[:phrase_fields] = "a^5 b c^1000"


    if(hasWildcards(@query))
      queryOptions[:alternate_query] = @query.downcase
      @results = solrServer.search("", queryOptions)
    else
      @results = solrServer.search(@query.blank? ? '*:*' : query,
queryOptions)
    end

Reply via email to