Is it possible to add boosts to docs and fields in Solr 1.4 DIH when using a JdbcDataSource? The documentation seem to suggest it's possible but I can't find any examples.
There are a few examples of how to add the boost="2.0" attribute to your docs/fields in XML imports, but how do you do the same with the JdbcDataSource?
The closest I could get to an answer was http://www.nabble.com/data-import-handler---going-deeper...-td20731715.html
Add a special value $fieldBoost. to the row map
Has this been implemented yet?
$fieldBoost is not implemented, but $docBoost is.
Source code.
Special commands docs.
This is not an answer, If you want to change the score of the field or the document you have added
http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_boost_the_score_of_newer_documents
just go through above link
Related
solr uses inverted index to find the document from the indexed "terms".
but what I wonder is that -
is there any approach to know all of the terms which refer to a specific documents?
thanks
You can use this Luke tool which allows you to explore Lucene index.
It depends of your Solr version but you can also use Luke request handler with an HTTP request. Here you have the documentation about this handler:
To use the LukeRequestHandler, make sure it is defined in your
solrconfig.xml:
<requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler"/>
Assuming you have this handler mapped to "/admin/luke" in
solrconfig.xml and are running the example on port localhost:8983,
visit:
/admin/luke
/admin/luke?fl=cat
/admin/luke?fl=id&numTerms=50
/admin/luke?id=SOLR1000
/admin/luke?docId=2
Forward index is what you were asking. here in general. here in solr
I'm using solr's more like this to analyze the most similar documents. But while I specify mlt.count argument and if it is not 15, the score don't show. The more like this arguments is mlt=true&mlt.fl=text&mlt.count=12, while text is the filed that has term vector. And the fl argument is *,score. I queried this url:
http://localhost:8983/solr/collection1/select?q=id%3A1967956383&wt=json&indent=true&mlt=true&mlt.fl=text&mlt.count=12.
When I specify mlt.count=15, the score shows up. And after that, I query mlt.count=12 again, it shows up, too.
My solr version is 4.0.
Does anybody have any idea? Thanks!
This has been documented as a SOLR bug SOLR-5042, and a patch posted against solr version 4.3. I've relocated that patch back to 4.2.1 and seen that it fixes this behavior there.
If you query the /mlt handler directly, instead of using the mlt component under the /select handler, you can work around this issue, as the handler accepts its count as rows=12 instead of mlt.count=12.
What is EditorialMarkerFactory in solr.?
How it used in DocumentTransformer...?
For what scenarios we have to use EditorialMarkerFactory in our application... ?
.
I tried using the EditorialMarkerFactory with solr 4.0 final and it wouldn't work. The error was class not found.
I changed the class to ElevatedMarkerFactory in the solrconfig.xml file and it started working. Solr needs to update the wiki and the default solrconfig.xml file
If you check the Wiki you can read why and how it is used. It says
EditorialMarkerFactory is used to mark items that have been editorially boosted by the QueryElevationComponent so that an application has the option of treating them specially
I'm very new with Solr,
And I really want a step by step to have my Solr search result like the google one.
To give you an idea, when you search 'PHP' in http://wiki.apache.org/solr/FindPage , the word 'php' shows up in bold .. This is the same result I want to have.
Showing only a parser even if the pdf is a very huge one.
You can use highlighting to show a matching snippet in the results.
http://wiki.apache.org/solr/HighlightingParameters
By default, it will wrap matching words with <em> tags, but you can change this by setting the hl.simple.pre/hl.simple.post parameters.
You may be looking at the wrong part of the returned data. Try looking at the 'highlighting' component of the returned data structure (i.e. don't look at the response docs). This should give you the snippets you want.
I am trying to apply filter tagging for Solr search Tagging_and_excluding_Filters.
The challenge is to apply multiple tagging at the same time (for multiple select options on a single page). e.g.
q=mainquery&fq=status:public&fq={!tag=dt}doctype:pdf&fq={!tag=doc}document:1&facet=on&facet.field={!ex=dt}doctype&facet.field={!ex=doc}document
But for some reason excluding works only for one filter and other gets unnoticed. Is there any problem with my syntax? Can anyone suggest a better method?
I'm having a similiar problem to solve and it seemed to work by just using a comma to seperate excluded tags:
From: http://wiki.apache.org/solr/SimpleFacetParameters#facet.field
Filter exclusion is supported for all types of facets. Both the tag
and ex local params may specify multiple values by separating them
with commas.
So I guess you'd use it like: {!ex=doc,dt}
This answer may not be timely, but i think this should resolve your issue.
Try adding both the tags in both the ex clauses.
I did that and it worked for me for a similar case.
q=mainquery&fq=status:public&fq={!tag=dt}doctype:pdf&fq={!tag=doc}document:1&facet=on&facet.field={!ex=dt,doc}doctype&facet.field={!ex=dt,doc}document
Possibly the http://wiki.apache.org/solr/SimpleFacetParameters#Multi-Select_Faceting_and_LocalParams section
would help you further than the from you mentioned one.
Best regards!