On 8/9/06, Doron Cohen <[EMAIL PROTECTED]> wrote:
  public StringIndex getStringIndex (IndexReader reader, String field)
  throws IOException {
    field = field.intern();
    synchronize(field) {  // < ----------- line added
      Object ret = lookup (reader, field, STRING_INDEX, null);
      if (ret == null) {
         final int[] retArray = new int[reader.maxDoc()];
         ... load field to cache ...
      }

Assuming "field" wasn't being used to synchronize on something else,
this would still block *all* IndexReaders/Searchers trying to sort on
that field.

In Solr, it would make the situation worse.  If I had my warmed-up
IndexSearcher serving live requests, and a new Searcher is opened in
the background to be warmed, a getStringIndex(warming,"foo") would
also block all getStringIndex(live,"foo").

-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to