You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Laurent Vaills <la...@gmail.com> on 2012/09/12 18:08:49 UTC
How to know the indexversion when sending a document ?
Hi,
When I index a document in Solr, I do not commit immediately after, I use
the autoCommit feature.
But I would like to know in which index's version the document will be
available. Is that possible to get this information in the HTTP response
when sending the document to index ?
Also, Is it possible to have the index's version in the Solr responseHeader
block when I issue a search query ?
Regards,
Laurent
Re: How to know the indexversion when sending a document ?
Posted by Laurent Vaills <la...@gmail.com>.
I forgot to mention that I am using Solr 3.6 .
Laurent
2012/9/12 Laurent Vaills <la...@gmail.com>
> Hi,
>
> When I index a document in Solr, I do not commit immediately after, I use
> the autoCommit feature.
> But I would like to know in which index's version the document will be
> available. Is that possible to get this information in the HTTP response
> when sending the document to index ?
>
> Also, Is it possible to have the index's version in the Solr
> responseHeader block when I issue a search query ?
>
> Regards,
> Laurent
>
>
Re: How to know the indexversion when sending a document ?
Posted by Chris Hostetter <ho...@fucit.org>.
: When I index a document in Solr, I do not commit immediately after, I use
: the autoCommit feature.
: But I would like to know in which index's version the document will be
: available. Is that possible to get this information in the HTTP response
: when sending the document to index ?
No, that version information doesn't even exist when you add the document,
so there is no way to return it to the update client.
: Also, Is it possible to have the index's version in the Solr responseHeader
: block when I issue a search query ?
That would be possible with a small amount of code -- but i'm not really
sure how useful it would be on every response. You can already see the
version info in use by the "currentSearcher" by asking the /mbeans handler
for the stats on that object...
http://localhost:8983/solr/admin/mbeans?stats=true&key=searcher
Can you elaborate a bit on your goal, because this is sort of smelling
like an XY Problem....
https://people.apache.org/~hossman/#xyproblem
XY Problem
Your question appears to be an "XY Problem" ... that is: you are dealing
with "X", you are assuming "Y" will help you, and you are asking about "Y"
without giving more details about the "X" so that we can understand the
full issue. Perhaps the best solution doesn't involve "Y" at all?
See Also: http://www.perlmonks.org/index.pl?node_id=542341
-Hoss