ug --index doesn't use index - why? #429
-
Hi,
So now I try to grep something using index:
and strace shows that
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Also, UGStore contains only 0303 0707 bytes, is it correct? |
Beta Was this translation helpful? Give feedback.
-
Index-based search is not used on a FILE target specified with ugrep. Only when searching recursively across a directory tree that contains index files. |
Beta Was this translation helpful? Give feedback.
-
Indeed, without specified file ugrep reads index files, thanks! |
Beta Was this translation helpful? Give feedback.
-
Index-based search works when the file system searched is cold or slow. Indexing with lower accuracy (the default) is best, unless you have regexes that MAY match a lot. The more precise the regex, the faster the search is, because there are fewer false positives. False positives are also reduced with higher accuracy, but with |
Beta Was this translation helpful? Give feedback.
-
Hmm, file has 11G, index (created with -9 ) has 65k. And looks empty for me - this is something suspicious for me.
ug found only three matching lines. |
Beta Was this translation helpful? Give feedback.
-
The maximum index is 64K for any file, even when the file is very large. This does not look suspicious. Large files are likely to have matches. |
Beta Was this translation helpful? Give feedback.
Index-based search is not used on a FILE target specified with ugrep. Only when searching recursively across a directory tree that contains index files.