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 stockii <st...@shopgate.com> on 2010/07/26 13:13:56 UTC

Solr Doc Lucene Doc !?

Hello. 

I write a little text about SOLR and LUCENE by using the DIH. 

what documents are creating and inserting DIH ? in wiki is the talk about
"solr documents" but i thought that, solr uses lucene to do this and so that
DIH creates Lucnee Documents, not Solr Documents !? 

what are doing the DIH exactly ? 

how can i easy find out that !? 

or how is intern manage the documents in solr ? is there a different about
solr and lucene doc`s ? 


can anyone give me a little overview how DIH works ? that would be great ;-) 

thx stockiii
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p995922.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Doc Lucene Doc !?

Posted by stockii <st...@shopgate.com>.
i write a little thesis about this. and i need to know how solr is using
lucene -in which way. in example of using dih and searching. so for my
better understanding ..  ;-)


-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p1118089.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Doc Lucene Doc !?

Posted by kenf_nc <ke...@realestate.com>.
Are you just trying to learn the tiny details of how Solr and DIH work? Is
this just an intellectual curiosity? Or are you having some specific problem
that you are trying to solve? If you have a problem, could you describe the
symptoms of the problem? I am using Solr, DIH, and several other related
technologies and have never needed to know the difference between a
SolrDocument and a LuceneDocument or how the UpdateHandler chains. So I'm
curious about what your ultimate goal is with these questions.
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p1117472.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Doc Lucene Doc !?

Posted by stockii <st...@shopgate.com>.
no help ? =( 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p1114172.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Doc Lucene Doc !?

Posted by stockii <st...@shopgate.com>.
oh, i see that i mixed DIH classes with other Solr classes ^^
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p1088738.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Doc Lucene Doc !?

Posted by stockii <st...@shopgate.com>.
i have a question about the solr index mechanism with DIH ...

i try to understand how solr index an doc, and on wich code-elements, solr
using lucene.

thats my stand:
DIH is using the SolrWriter to add an doc.
To create an SolrInoputDocument SolrWriter uses the addUpdateCommand, 
This Command and Doc is put in the UpdateRequestProcessorChain. In this
Chain solr creates an LuceneDoc with DocumentBuilder and put it back into
the chain !?!? is this right ? 

Then the UpdateHandler getting the UpdateChain and managed the index changes
!?

So. i dont understand, how works the updatehandler. can anyone give me some
tipps ? 

SolrIndexWriter is using from UpdateHandler and SolrindexWriter use
IndexWriter from Lucene ? 

thx for your help =)=)
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p1088334.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Doc Lucene Doc !?

Posted by stockii <st...@shopgate.com>.

There is a real and actual class named "SolrDocument".  it is a simpler 
object then Lucene's "Document" class becuase in Solr the details about 
the field types (stored, indexed, etc...) are handled by the schema, and 
are not distinct per Field instance. 
Chris Hostetter-3 wrote:
> 
> 

okay thx, that make sense, but why is in class AddUpadeteCommand.java this:

   // Higher level SolrInputDocument, normally used to construct the Lucene
Document
   // to index.
   public SolrInputDocument solrDoc;

???? thx =)
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p1030346.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Doc Lucene Doc !?

Posted by stockii <st...@shopgate.com>.
ah okay thx =)

the class "SolrInputDocuments" is only for indexing an document and
"SolrDocuement" for the search ?

when Solr index an document first step is to create an SolrInputDocument.
then in class "DocumentBuilder" creates solr in function "Document
toDocument (SolrInputDoc, Schema)"
an Lucene Document ?! 

-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p997196.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Doc Lucene Doc !?

Posted by Chris Hostetter <ho...@fucit.org>.
: i want to learn more about the technology.
: 
: exists an issue to create really an solrDoc ? Or its in the code only for a
: better understanding of the lucene and solr border ? 

There is a real and actual class named "SolrDocument".  it is a simpler 
object then Lucene's "Document" class becuase in Solr the details about 
the field types (stored, indexed, etc...) are handled by the schema, and 
are not distinct per Field instance.

http://lucene.apache.org/solr/api/org/apache/solr/common/SolrDocument.html

: -- 
: View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p996666.html
: Sent from the Solr - User mailing list archive at Nabble.com.
: 



-Hoss


Re: Solr Doc Lucene Doc !?

Posted by stockii <st...@shopgate.com>.
i want to learn more about the technology.

exists an issue to create really an solrDoc ? Or its in the code only for a
better understanding of the lucene and solr border ? 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p996666.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Doc Lucene Doc !?

Posted by kenf_nc <ke...@realestate.com>.
DataImportHandler (DIH) is an add-on to Solr. It lets you import documents
from a number of sources in a flexible way. The only connection DIH has to
Lucene is that Solr uses Lucene as the index engine.

When you work with Solr you naturally talk about Solr Documents, if you were
working with Lucene natively (without Solr) you would talk about Lucene
documents, but they are basically the same thing. 

Are you having a specific issue? Or are you just trying to learn more about
the technology?

If you are mostly trying to understand DIH, then you should think in terms
of Solr and Solr documents. Understand that Lucene is working behind the
scenes, but you really don't need to worry about that all that often.
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p996425.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Doc Lucene Doc !?

Posted by stockii <st...@shopgate.com>.
... but in the code is the talk about of, SolrDocuments. these are higher
level docs, used to construct the lucene doc to index ... !!?!?!?!? 

and in wiki is the talk about "Build Solr documents by aggregating data from
multiple columns and tables according to configuration"
http://wiki.apache.org/solr/DataImportHandler?highlight=(dih)

so its a little bit confused.
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p996005.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Doc Lucene Doc !?

Posted by MitchK <mi...@web.de>.
Stockii,

Solr's index is a Lucene Index. Therefore, Solr documents are Lucene
documents.

Kind regards,
- Mitch
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Doc-Lucene-Doc-tp995922p995968.html
Sent from the Solr - User mailing list archive at Nabble.com.