mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
CE-1955 Add some room for a PVS search to return duplicates... room to improve here though.
This commit is contained in:
@ -262,12 +262,13 @@ public class BulkLoadValueMapper
|
|||||||
searchPossibleValueSourceInput = new SearchPossibleValueSourceInput();
|
searchPossibleValueSourceInput = new SearchPossibleValueSourceInput();
|
||||||
searchPossibleValueSourceInput.setPossibleValueSourceName(field.getPossibleValueSourceName());
|
searchPossibleValueSourceInput.setPossibleValueSourceName(field.getPossibleValueSourceName());
|
||||||
searchPossibleValueSourceInput.setLabelList(new ArrayList<>(valuesNotFound));
|
searchPossibleValueSourceInput.setLabelList(new ArrayList<>(valuesNotFound));
|
||||||
searchPossibleValueSourceInput.setLimit(valuesNotFound.size()); // todo - a little sus... leaves no room for any dupes, which, can they happen?
|
searchPossibleValueSourceInput.setLimit(valuesNotFound.size() * 10); // todo - a little sus... leaves some room for dupes, which, can they happen?
|
||||||
|
|
||||||
LOG.debug("Searching possible value source by labels during bulk load mapping", logPair("pvsName", field.getPossibleValueSourceName()), logPair("noOfLabels", valuesNotFound.size()), logPair("firstLabel", () -> valuesNotFound.iterator().next()));
|
LOG.debug("Searching possible value source by labels during bulk load mapping", logPair("pvsName", field.getPossibleValueSourceName()), logPair("noOfLabels", valuesNotFound.size()), logPair("firstLabel", () -> valuesNotFound.iterator().next()));
|
||||||
searchPossibleValueSourceOutput = new SearchPossibleValueSourceAction().execute(searchPossibleValueSourceInput);
|
searchPossibleValueSourceOutput = new SearchPossibleValueSourceAction().execute(searchPossibleValueSourceInput);
|
||||||
for(QPossibleValue<?> possibleValue : searchPossibleValueSourceOutput.getResults())
|
for(QPossibleValue<?> possibleValue : searchPossibleValueSourceOutput.getResults())
|
||||||
{
|
{
|
||||||
|
// todo - deal with multiple values found - and maybe... if some end up not-found, but some dupes happened, should we try another search, in case we hit the limit?
|
||||||
valuesFoundAsStrings.put(possibleValue.getLabel(), possibleValue);
|
valuesFoundAsStrings.put(possibleValue.getLabel(), possibleValue);
|
||||||
valuesNotFound.remove(possibleValue.getLabel());
|
valuesNotFound.remove(possibleValue.getLabel());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user