mirror of https://gitee.com/bigwinds/arangodb
A user can now create an indux on attribute[*] which will put an index on attribute and ignores the expand flag. Does not harm any feature in AQL now.
This commit is contained in:
parent
9bec46d088
commit
c2338d80d0
|
@ -1546,7 +1546,7 @@ void IndexRangeBlock::sortConditions () {
|
|||
for (size_t u = 0; u < _condition->at(s).size(); u++) {
|
||||
auto const& ri = _condition->at(s)[u];
|
||||
std::string fieldString;
|
||||
TRI_AttributeNamesToString(en->_index->fields[t], fieldString);
|
||||
TRI_AttributeNamesToString(en->_index->fields[t], fieldString, true);
|
||||
|
||||
if (fieldString.compare(ri._attr) == 0) {
|
||||
|
||||
|
|
|
@ -550,7 +550,7 @@ ExecutionNode::IndexMatch ExecutionNode::CompareIndex (ExecutionNode const* node
|
|||
|
||||
for (; (i < idxFields && j < n); i++) {
|
||||
std::string fieldString;
|
||||
TRI_AttributeNamesToString(idx->fields[i], fieldString);
|
||||
TRI_AttributeNamesToString(idx->fields[i], fieldString, true);
|
||||
if (equalityLookupAttributes.find(fieldString) != equalityLookupAttributes.end()) {
|
||||
// found an attribute in the sort criterion that is used in an equality lookup, too...
|
||||
// (e.g. doc.value == 1 && SORT doc.value1)
|
||||
|
@ -1249,7 +1249,7 @@ size_t EnumerateCollectionNode::getUsableFieldsOfIndex (Index const* idx,
|
|||
size_t count = 0;
|
||||
for (size_t i = 0; i < idx->fields.size(); i++) {
|
||||
std::string tmp;
|
||||
TRI_AttributeNamesToString(idx->fields[i], tmp);
|
||||
TRI_AttributeNamesToString(idx->fields[i], tmp, true);
|
||||
if (attrs.find(tmp) == attrs.end()) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -2365,7 +2365,7 @@ class FilterToEnumCollFinder final : public WalkerWorker<ExecutionNode> {
|
|||
|
||||
for (size_t j = 0; j < idx->fields.size(); j++) {
|
||||
std::string fieldString;
|
||||
TRI_AttributeNamesToString(idx->fields[j], fieldString);
|
||||
TRI_AttributeNamesToString(idx->fields[j], fieldString, true);
|
||||
auto range = map->find(fieldString);
|
||||
|
||||
if (range == map->end() || ! range->second.is1ValueRangeInfo()) {
|
||||
|
@ -2411,7 +2411,7 @@ class FilterToEnumCollFinder final : public WalkerWorker<ExecutionNode> {
|
|||
auto const map = _rangeInfoMapVec->find(var->name, validPos[k]);
|
||||
|
||||
std::string fieldString;
|
||||
TRI_AttributeNamesToString(idx->fields[0], fieldString);
|
||||
TRI_AttributeNamesToString(idx->fields[0], fieldString, true);
|
||||
// check if there is a range that contains the first index attribute
|
||||
auto range = map->find(fieldString);
|
||||
|
||||
|
@ -2429,7 +2429,7 @@ class FilterToEnumCollFinder final : public WalkerWorker<ExecutionNode> {
|
|||
size_t j = 0;
|
||||
while (++j < prefixes.at(i) && equality) {
|
||||
std::string fieldString;
|
||||
TRI_AttributeNamesToString(idx->fields[j], fieldString);
|
||||
TRI_AttributeNamesToString(idx->fields[j], fieldString, true);
|
||||
range = map->find(fieldString);
|
||||
|
||||
if (range == map->end()) {
|
||||
|
@ -2459,7 +2459,7 @@ class FilterToEnumCollFinder final : public WalkerWorker<ExecutionNode> {
|
|||
|
||||
for (size_t j = 0; j < idx->fields.size(); j++) {
|
||||
std::string fieldString;
|
||||
TRI_AttributeNamesToString(idx->fields[j], fieldString);
|
||||
TRI_AttributeNamesToString(idx->fields[j], fieldString, true);
|
||||
auto range = map->find(fieldString);
|
||||
|
||||
if (range == map->end()) {
|
||||
|
|
|
@ -50,10 +50,10 @@ namespace triagens {
|
|||
bool const shouldExpand;
|
||||
|
||||
AttributeName (std::string const& pName)
|
||||
: name(pName), shouldExpand(false) {};
|
||||
: name(pName), shouldExpand(false) { };
|
||||
|
||||
AttributeName (std::string const& pName, bool pExpand)
|
||||
: name(pName), shouldExpand(pExpand) {};
|
||||
: name(pName), shouldExpand(pExpand) { };
|
||||
|
||||
bool operator== (const AttributeName& b) const {
|
||||
return name == b.name && shouldExpand == b.shouldExpand;
|
||||
|
|
Loading…
Reference in New Issue