Closed gedw99 closed 1 year ago
I just pushed some changes I had locally so the tests pass now. autogold is awesome.
This project watches a directory of json-files. Each file can contain many items that will be indexed, so they can be found in the search frontend.
I haven't done anything so far to make this project useful for anyone but myself, but I can clean it up a bit if you would like to have a closer look.
Thanks @larschri
Teally awesome of you to fix it so quickly. Will try again this morning .
I really am into this project with the:
I was thinking about using the thing with NATS to do the transport of the html
Hi @gedw99 ,
Cool if you find this useful! Unfortunately it lacks doc, but here's how to start the server with some demo-data:
go run ./... -dir testdata/jsons -index mydir
Then, open http://localhost:8090/s/ and search for something. It displays the search results with a crude layout for now, but it should be simple to improve.
I think Autogold is really nice for regression testing on a high level. It makes it simple to catch regressions and seeing the exact differences when making changes to the code. There are no finer grained unit tests here. Like it or not :-)
The 'dirindex' package is about watching a directory to make dynamic updates to the search index. I hope you can ignore it if you don't care about it - I tried to avoid tight couplings between the packages.
thanks . that helps. Maybe a make file for task file for all this sort of dev tips ?
Also your using old bleve code. Maybe consider bluge or just use zinc. https://github.com/zinclabs/zinc wraps bluge: https://github.com/zinclabs/zinc/blob/main/go.mod#L9
Thanks for feedback!
I have created a Makefile with a 'demo' target, and a tiny README.md, and updated bleve version.
Thanks for pointing me to Bluge. I'll have a look at it.
Sweet . Will make it easier
autogold seems really cool.
go test -update
go test .