shibukawa / oktavia

Full text search engine for JS environments
MIT License
70 stars 11 forks source link

'Invalid data file' on running oktavia-search-cli #26

Closed shiumachi closed 10 years ago

shiumachi commented 10 years ago

Environment

$ oktavia-mkindex-cli -i . -r . -m text -u line
$ oktavia-search-cli search/searchindex.js "cat"

Symptom

get the following error.

Search Engine Oktavia - Command-line Search Client

/Users/sho/src/oktavia/bin/oktavia-search-cli:892
        throw new Error('Invalid data file');
              ^
Error: Invalid data file
    at Oktavia$load$LOktavia$S (/Users/sho/src/oktavia/bin/oktavia-search-cli:892:9)
    at Search$loadIndex$LSearch$LOktavia$S (/Users/sho/src/oktavia/bin/oktavia-search-cli:246:3)
    at Search$search$LSearch$SASILStyle$US (/Users/sho/src/oktavia/bin/oktavia-search-cli:208:8)
    at Function._Main$main$AS (/Users/sho/src/oktavia/bin/oktavia-search-cli:518:3)
    at Object.JSX.runMain (/Users/sho/src/oktavia/bin/oktavia-search-cli:36615:15)
    at /Users/sho/src/oktavia/bin/oktavia-search-cli:36657:5
    at Object.<anonymous> (/Users/sho/src/oktavia/bin/oktavia-search-cli:36658:3)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

Test Data

sho-mbp:testdir sho$ ls
001.txt 002.txt 003.txt
sho-mbp:testdir sho$ cat 001.txt
this is a cat.
sho-mbp:testdir sho$ cat 002.txt
this is a dog.
sho-mbp:testdir sho$ cat 003.txt
dog cat bird
shibukawa commented 10 years ago

https://github.com/shibukawa/oktavia/issues/21 dup