File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
server/src/main/java/org/elasticsearch/index/codec/vectors/es818 Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1515 * See the License for the specific language governing permissions and
1616 * limitations under the License.
1717 *
18- * Modifications copyright (C) 2024 Elasticsearch B.V.
18+ * Modifications copyright (C) 2025 Elasticsearch B.V.
1919 */
2020package org .elasticsearch .index .codec .vectors .es818 ;
2121
5050import static org .apache .lucene .codecs .lucene99 .Lucene99HnswVectorsReader .readSimilarityFunction ;
5151import static org .apache .lucene .codecs .lucene99 .Lucene99HnswVectorsReader .readVectorEncoding ;
5252
53- /** Copied from Lucene99FlatVectorsReader in Lucene 10.1, then modified */
53+ /** Copied from Lucene99FlatVectorsReader in Lucene 10.1, then modified to support DirectIOIndexInputSupplier */
5454@ SuppressForbidden (reason = "Copied from lucene" )
5555public class ES818FlatVectorsReader extends FlatVectorsReader {
5656
@@ -119,6 +119,7 @@ private static IndexInput openDataInput(
119119 IOContext context
120120 ) throws IOException {
121121 String fileName = IndexFileNames .segmentFileName (state .segmentInfo .name , state .segmentSuffix , fileExtension );
122+ // use direct IO for accessing raw vector data for searches
122123 IndexInput in = context .context () == IOContext .Context .DEFAULT && state .directory instanceof DirectIOIndexInputSupplier did
123124 ? did .openInputDirect (fileName , context )
124125 : state .directory .openInput (fileName , context );
You can’t perform that action at this time.
0 commit comments