The stats.jsp page walks the internal JMX beans. It prints out the
numbers of documents among other things. I would look at how that
works instead of writing your own thing for the internal APIs.
They may have changed from Solr 1.3 to 1.4 and will change further for
1.5 (4.0 is the new name?).
On
Chris,
I am using SolrIndexSearcher to get a handle to the total number of records
in the index. I am doing it like this :
int num =
Integer.parseInt((String)solrSearcher.getStatistics().get("numDocs").toString());
Please let me know if there is a better way to do this.
Mark,
I can tell you what I
: Thank you I found the API to get the existing SolrIndexSearcher to be
: present in SolrCore:
: SolrCore.getSearcher().get()
I think perhaps you need to take 5 big steps back and explain what your
goal is. 99.999% of all solr users should never care about that method --
even the 99.9% of
Good question.
Well, I never worked productively with SolrJ.
But two things:
The first: As the documentation says, you *should* get your IndexSearcher
from your SolrQueryRequest-object.
The second: As a developer of the SolrJ I would do as much as I can
automatically behind the curtain. That mean
Thank you I found the API to get the existing SolrIndexSearcher to be
present in SolrCore:
SolrCore.getSearcher().get()
So if now the Index changes (a commit is done) in between, will I
automatically get the new SolrIndexSearcher from this call ?
Regards
Rahul
On Mon, May 24, 2010 at 11:25
Ahh, now I understand.
No, you need no second IndexSearcher as long as the Server is alive.
You can reuse your searcher for every user.
The only commands you are executing per user are those to create a
search-query.
Kind regards,
- Mitch
--
View this message in context:
http://lucene.472066.
<>
I have an application deployed on an application server (Weblogic). This
application uses solr to query an index. Users (sessions) will log in to the
application, query and then log out. This login and logout has nothing to do
with solr but the application manages them separately. I am using
Emb
> In my case, I have an index which will not be modified after creation.
> Does
> this mean that in a multi-user scenario, I can have a static IndexSearcher
> object that can be shared by multiple users ?
>
I am not sure, what you mean with "multi-user"-scenario. Can you tell me
what you got
Mitch,
Thank you for your response. A few follow up questions for clarification :
<>
In my case, I have an index which will not be modified after creation. Does
this mean that in a multi-user scenario, I can have a static IndexSearcher
object that can be shared by multiple users ?
<>
If the Index
Rahul,
the IndexSearcher of Solr gets shared with every request within two commits.
That means one IndexSearcher + its caches got a lifetime of one commit.
After every commit, there will be a new one created.
The cache does not mean, that they are applied automatically. They mean,
that a filter
10 matches
Mail list logo