: So what I want to do is to modify Solr a bit - add one servlet so I can
: trigger a full index of a folder in the file system.
        ...

: I guess there are two SolrServer instances(one is EmbeddedSolrServer,
: created by myself and the other is come with Solr itself and they are
: holding different index?

i suspect you are correct, but frankly i'm amazed hwat you are doing is 
working at all (you should be getting a write lock from having two 
distinct Solr instances trying to write to the same directory)

I think you need to back up and explain better what your overall goal is 
-- embedding Solr in other apps is:

a) a fairly advanced usage that i would not suggest you persue until 
you have a better grasp of solr fundementals
b) not something people usually do if they also want to be able to use 
solr via HTTP.

in general, if your only goal of mucking with the solr.war is to be able 
to index files on the "local" filesystem (relative where Solr is running) 
there are a lot of other ways to approach that goal (use DIH, or write a 
custom RequestHanlder you load as a plugin, etc...)

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

Reply via email to