forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/8.x' into backport/8.x/pr-114247
- Loading branch information
Showing
185 changed files
with
6,676 additions
and
2,997 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 112933 | ||
summary: "Allow incubating Panama Vector in simdvec, and add vectorized `ipByteBin`" | ||
area: Search | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 113251 | ||
summary: Span term query to convert to match no docs when unmapped field is targeted | ||
area: Search | ||
type: bug | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 113623 | ||
summary: "Adding chunking settings to `MistralService,` `GoogleAiStudioService,` and\ | ||
\ `HuggingFaceService`" | ||
area: Machine Learning | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 113812 | ||
summary: Add Streaming Inference spec | ||
area: Machine Learning | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 113873 | ||
summary: Default inference endpoint for ELSER | ||
area: Machine Learning | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 114002 | ||
summary: Add a `mustache.max_output_size_bytes` setting to limit the length of results from mustache scripts | ||
area: Infra/Scripting | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 114080 | ||
summary: Stream Cohere Completion | ||
area: Machine Learning | ||
type: enhancement | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
libs/simdvec/src/main/java/org/elasticsearch/simdvec/ESVectorUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
package org.elasticsearch.simdvec; | ||
|
||
import org.elasticsearch.simdvec.internal.vectorization.ESVectorUtilSupport; | ||
import org.elasticsearch.simdvec.internal.vectorization.ESVectorizationProvider; | ||
|
||
import static org.elasticsearch.simdvec.internal.vectorization.ESVectorUtilSupport.B_QUERY; | ||
|
||
public class ESVectorUtil { | ||
|
||
private static final ESVectorUtilSupport IMPL = ESVectorizationProvider.getInstance().getVectorUtilSupport(); | ||
|
||
public static long ipByteBinByte(byte[] q, byte[] d) { | ||
if (q.length != d.length * B_QUERY) { | ||
throw new IllegalArgumentException("vector dimensions incompatible: " + q.length + "!= " + B_QUERY + " x " + d.length); | ||
} | ||
return IMPL.ipByteBinByte(q, d); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...ain/java/org/elasticsearch/simdvec/internal/vectorization/DefaultESVectorUtilSupport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
package org.elasticsearch.simdvec.internal.vectorization; | ||
|
||
import org.apache.lucene.util.BitUtil; | ||
|
||
final class DefaultESVectorUtilSupport implements ESVectorUtilSupport { | ||
|
||
DefaultESVectorUtilSupport() {} | ||
|
||
@Override | ||
public long ipByteBinByte(byte[] q, byte[] d) { | ||
return ipByteBinByteImpl(q, d); | ||
} | ||
|
||
public static long ipByteBinByteImpl(byte[] q, byte[] d) { | ||
long ret = 0; | ||
int size = d.length; | ||
for (int i = 0; i < B_QUERY; i++) { | ||
int r = 0; | ||
long subRet = 0; | ||
for (final int upperBound = d.length & -Integer.BYTES; r < upperBound; r += Integer.BYTES) { | ||
subRet += Integer.bitCount((int) BitUtil.VH_NATIVE_INT.get(q, i * size + r) & (int) BitUtil.VH_NATIVE_INT.get(d, r)); | ||
} | ||
for (; r < d.length; r++) { | ||
subRet += Integer.bitCount((q[i * size + r] & d[r]) & 0xFF); | ||
} | ||
ret += subRet << i; | ||
} | ||
return ret; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...java/org/elasticsearch/simdvec/internal/vectorization/DefaultESVectorizationProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
package org.elasticsearch.simdvec.internal.vectorization; | ||
|
||
final class DefaultESVectorizationProvider extends ESVectorizationProvider { | ||
private final ESVectorUtilSupport vectorUtilSupport; | ||
|
||
DefaultESVectorizationProvider() { | ||
vectorUtilSupport = new DefaultESVectorUtilSupport(); | ||
} | ||
|
||
@Override | ||
public ESVectorUtilSupport getVectorUtilSupport() { | ||
return vectorUtilSupport; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...c/src/main/java/org/elasticsearch/simdvec/internal/vectorization/ESVectorUtilSupport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
package org.elasticsearch.simdvec.internal.vectorization; | ||
|
||
public interface ESVectorUtilSupport { | ||
|
||
short B_QUERY = 4; | ||
|
||
long ipByteBinByte(byte[] q, byte[] d); | ||
} |
Oops, something went wrong.