weavejester / clucy

Clojure interface to Lucene
Eclipse Public License 1.0
172 stars 58 forks source link

Search meta #5

Closed technomancy closed 13 years ago

technomancy commented 13 years ago

I needed to get the total hits back from a query, so I added it as metadata to the search results seq. Thoughts?

weavejester commented 13 years ago

Is metadata the best place for these values? I suspect I've misused metadata in Clucy, and its design probably needs to be rethought a little. What do you think?

technomancy commented 13 years ago

I think metadata is appropriate for this. You get a seq of results that is a subsequence of the full result seq, and the size of the full result seq seems like appropriate metadata to the subsequence.

Perhaps if a truly lazy result seq were offered that would be a better overall abstraction, but this seems valuable nonetheless. It seems like it would be useful to provide a search function that allows callers to handle the scope of the with-open on their searchers; this would make fully lazy result seqs a lot more useful. (I can noodle on this if you think it's a good idea.)

I think the current use of metadata for field settings is appropriate too.

weavejester commented 13 years ago

Would you happen to be interested in becoming a co-maintainer for Clucy, and being given push access in Github and Clojars? Clucy isn't a project I've touched in a while, and could do with some attention from someone who is actively using it :)

technomancy commented 13 years ago

Sure; that'd be great. My usage is pretty simple and will wind down once Leiningen's search task is complete, but the more the merrier. Thanks. =)

weavejester commented 13 years ago

Okay, you should be added now. Feel free to push out more versions as needed until you've added all the functionality you want.