Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 15069D6A6 for ; Fri, 29 Jun 2012 17:20:02 +0000 (UTC) Received: (qmail 19211 invoked by uid 500); 29 Jun 2012 17:20:01 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 19036 invoked by uid 500); 29 Jun 2012 17:20:00 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Delivered-To: moderator for dev@lucene.apache.org Received: (qmail 15497 invoked by uid 99); 29 Jun 2012 13:02:43 -0000 X-ASF-Spam-Status: No, hits=3.0 required=5.0 tests=FORGED_YAHOO_RCVD,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Date: Fri, 29 Jun 2012 06:02:17 -0700 (PDT) From: Arjun Dhar To: dev@lucene.apache.org Message-ID: <1340974937233-3992080.post@n3.nabble.com> Subject: Query, Searcher, Weight, Similarity = ? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm new and that is my disclaimer to the stupid question I am about to ask. Am trying to form a conceptual picture of the relation between Query <--> Weight <--> IndexReader, Scorer, Searcher <--> Similarity *From what I gather : (and someone please validate or correct me) * 1. We want *Queries* to be RE-USABLE instances hence *Weight* is a specific Queries state !? 2. *Searcher* is STATEFUL, and though it processes a *Query*, the state for that *Searcher* is delegated to the WEIGHT !? 3. *IndexReader* Reads an Index, and the *Searcher* uses the Reader to SEARCH, using a QUERY 4. From the JavaDocs of Weight class ----> "IndexReader dependent state should reside in the Scorer. " -- Means, when *weights* are calculated, the final result of the Calculation goes into a STATEFUL object represented by the *Scorer* which is also Iterable !? 5. *Searcher* can be assigned a *Similarity* algorithm. ... hence using that algorithm, it calculates *Weight*, which eventually leads to the construction of an Iterable *Scorer* !? 6. While Indexing, its simple there is a direct relation between IndexWriterConfig <--> Similarity +Q) Apart from the validation of my understanding, is there a Sequence Diagram explaining the process of calculation, during a Query? +Q) There are different implementations of Queries. Do they differ in how they mash up all the other stuff? Looks like if i mess each of the other entities, I can pretty much produce whatever Query?! thanks -- View this message in context: http://lucene.472066.n3.nabble.com/Query-Searcher-Weight-Similarity-tp3992080.html Sent from the Lucene - Java Developer mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org