Skip to content

Commit

Permalink
Support prefix search in fulltext search
Browse files Browse the repository at this point in the history
  • Loading branch information
jedelbo committed Aug 4, 2023
1 parent 64be331 commit dafeb83
Show file tree
Hide file tree
Showing 8 changed files with 305 additions and 111 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Enhancements
* <New feature description> (PR [#????](https://github.com/realm/realm-core/pull/????))
* None.
* Full text search supports searching for prefix only. Eg. "description TEXT 'alex*'" ([#6860](https://github.com/realm/realm-core/issues/6860))

### Fixed
* <How do the end-user experience this issue? what was the impact?> ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?)
Expand Down
17 changes: 0 additions & 17 deletions src/realm/bplustree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,23 +546,6 @@ class BPlusTree : public BPlusTreeBase {
});
}


void dump_values(std::ostream& o, int level) const
{
std::string indent(" ", level * 2);

auto func = [&o, indent](BPlusTreeNode* node, size_t) {
LeafNode* leaf = static_cast<LeafNode*>(node);
size_t sz = leaf->size();
for (size_t i = 0; i < sz; i++) {
o << indent << leaf->get(i) << std::endl;
}
return IteratorControl::AdvanceToNext;
};

m_root->bptree_traverse(func);
}

protected:
LeafNode m_leaf_cache;

Expand Down
9 changes: 9 additions & 0 deletions src/realm/column_integer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ class IntegerColumn : public BPlusTree<int64_t> {
{
return IntegerColumnIterator(this, size());
}

void dump_values(std::ostream& o, int level) const
{
std::string indent(level * 2, ' ');

for_all([&o, indent](auto i) {
o << indent << int(i) << std::endl;
});
}
};

inline int64_t IntegerColumnIterator::operator->() const
Expand Down
Loading

0 comments on commit dafeb83

Please sign in to comment.