org.apache.solr.search

## Class QueryContext

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.IdentityHashMap
    - - org.apache.solr.search.QueryContext

- All Implemented Interfaces:
    Closeable, Serializable, AutoCloseable, Cloneable, Map

      public class QueryContext
      extends IdentityHashMap
      implements Closeable

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueryContext(IndexSearcher searcher)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCloseHook(Closeable closeable)` implementations obtained via inheritance public Object get(Object key) { return map.get(key); } public Object put(Object key, Object val) { if (map == null) { map = new IdentityHashMap(); } return map.put(key, val); }
    `void` | `close()` Don't call close explicitly! This will be automatically closed at the end of the request
    `IndexSearcher` | `indexSearcher()`
    `static QueryContext` | `newContext(IndexSearcher searcher)`
    `boolean` | `removeCloseHook(Closeable closeable)`
    `SolrIndexSearcher` | `searcher()`

    - ### Methods inherited from class java.util.IdentityHashMap

      `clear, clone, containsKey, containsValue, entrySet, equals, forEach, get, hashCode, isEmpty, keySet, put, putAll, remove, replaceAll, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `compute, computeIfAbsent, computeIfPresent, getOrDefault, merge, putIfAbsent, remove, replace, replace`

- - ### Constructor Detail

    - #### QueryContext

          public QueryContext(IndexSearcher searcher)

  - ### Method Detail

    - #### newContext

          public static QueryContext newContext(IndexSearcher searcher)

    - #### searcher

          public SolrIndexSearcher searcher()

    - #### indexSearcher

          public IndexSearcher indexSearcher()

    - #### addCloseHook

          public void addCloseHook(Closeable closeable)

      implementations obtained via inheritance public Object get(Object key) { return map.get(key); } public Object put(Object key, Object val) { if (map == null) { map = new IdentityHashMap(); } return map.put(key, val); }

    - #### removeCloseHook

          public boolean removeCloseHook(Closeable closeable)

    - #### close

          public void close()
                     throws IOException

      Don't call close explicitly! This will be automatically closed at the end of the request
      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.