« Mea Culpa | Main| MY PRRRREECIOUS... »

Introducing Haystack


So I've been trying to get this completed enough to launch a project for about a week now.  The release of the Notes 8 public beta slowed me down for a while, but my alpha version is ready, and I want to get it in the hands of some folks and see if I can recruit some help.

Haystack is a search tool for Notes developers.  It's a full-text searching solution that allows aggregation from multiple NSFs and even multiple servers.  It's PURE Lotuscript.  It uses a simple frameset and two script libraries right now.  As the configurability of the tool grows, though, it will end up having a much larger toolkit.

It's Lotuscript class-based, and I'm not really an OO expert, so if you're a stickler for blackboxed classes, you probably won't be happy.  I like public properties.  :)  It uses my multiple NSF caching strategy, so there might be something useful in the source code for you even if you don't need searching.

It WILL integrate OpenLog, when I get the chance to sit down with Julian's brand-spanking-new 1.6 release.

What is DOES is: perform FT searches on one or more target NSFs (which must be FT indexed) and build local stub documents in haystack.nsf.  These stub documents contain necessary details about the original document, and I'll be putting together some controls to allow the developer to build simple maps to specify what content should be included in the stub document.

The most important thing is does, however, is allow the developer to access a collection of what the user selected in the search results view.  This is tricky, because we're actually talking about documents that might be aggregated from several NSFs.  It actually presents a LIST of NotesDocumentCollections, where the ListTag is the server!!path to the NSF where the original documents are contained.  The subsequent document collection is of the ORIGINAL documents, not the stub documents that were actually selected (although you can get that very easily, too!)

I have a lot left to do here, and hopefully I'll be able to get some help.  I really want to have a flexible view-generation engine for putting different views into haystack.nsf, so the developer can easily configure presentation of search results.

And most of all, I have a lot of developer documentation to write.  Feel free to contribute snippets in comments here or in the project discussion!

Many thanks to Colin Macdonald, who inspired the overall model of how this works, and Rocky Oliver, who helped me flesh out a few details over IM.  I expect contributions from you both, y'know!

Comments

1 - I'm definitely going to take a look at this tonight. I've been meaning to try something almost identical, but specifically for design notes, so I'm hoping your approach will give me a head start.

Also, let me know what help you're looking for; I'd be happy to help if I can.

2 - Nice job Nathan .. will check it out soon

3 - I'm going to have to work with this a bit to wrap my head around it. It sounds like it's exactly what I've wanted to be able to do in Notes for a very, very long time. The multiple database search never did enough to be useful for me.

4 - Sounds like something I was thinking of also. Let me know if I can help and what you are looking for. Maybe you can share the original genesis that seeded this project.

Also I see you are creating stub docs. How about allowing some transformations of the original docs with the results written to the stub docs to then display summarized data?

5 - @4 - Actually, if the idea is that you would like to take the original documents, and be able to put some processed version of that data into the stub document, then answer is: you'll be able to. By Friday, if I meet my target -- by Monday if I'm late.

Basically, you'll have complete @function language on the wire. Why? Because you'll be able to put a formula in the mapping document and I'll simply do an Evaluate() on what you put in. Even if it's simply a field name, we'll just evaluate it, 'cause the result on the LS side is the same. Emoticon

But that means you'll get any transform available in the LS Evaluate function, which is pretty much anything not involving user interaction or an @Command.

6 - @5 - Sounds good. I was also thinking of a situation where you might start with, for example, 1000 documents in the original db and only show 52 docs in the search view. That is, the transform would total some value (hours worked) by some category (week number) and only show the resulting documents. This would mean that you would have to associate such a stub doc with none of the original documents or maybe the first one in the view. Or, have another sub search results view (in Haystack) that would show the original documents (their stubs) that have gone into computing the total stub. Or instead of the sub search results view open a dialog box with a view showing the results of a search for the original docs. Does this make sense? And I am thinking out loud at this stage.

The following might be a bit tricky or "outside of the box" but let me throw it out there.
Another scenario would be when I have appointments, historical and planned spanning a year. What I would like to do is to show the whole year with an indication if there was or is going to be any appointment in a given month. What I see is a view that has 13 columns. First column shows the person's name and the remaining 12 columns correspond to the months of year. So for all the personal appointments for a given year there is one summary doc needed with a flag (yes/no) for each month. All I am trying to show is an indication of any activity in a particular month or its absence. I guess this could be one type of display for calendrical data as opposed to text and number lists.

7 - @6 - You're really talking about a more generalized reporting tool, I think. Something to build abstract summaries. It's a cool idea, but it's not in the scope of Haystack right now.

That being said, if you download the code and you think you can achieve a sufficiently configurable version of what you just described, I LOVE to fold it back into the original coding effort!

8 - @7 - A general reporting tool is what I am thinking of. Although, a truly general reporting tool might be out of my scope, at least for the moment. Being able to show related documents from different databases would be great. Then the ability to see summaries would be better. I will start tinkering once you have had a chance to flesh out your code some more as I think it makes sense to reuse that.

9 - I'm really looking forward to checking this out. Darn work keeps getting in the way!!! Emoticon

10 - It's Saturday 31 March 1:15PM (eastern Australian standard time, which is 11:15PM US east coast summer time). I just downloaded Haystack.NSF but although the database icon is clearly present it gives "File does not exist" error. (Downloaded it a second time in caseof corruption, got the same error again.) Is the DB still encrypted, or whatever?

11 - Great idea Nathan, Eagerly waiting for your valuable output on this front. I too would like to have such a code which can provide such great flexibility in the search mechanism.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Search 

Disclaimer 

Welcome to Escape Velocity!

Opinions expressed here by Nathan T. Freeman are not necessarily those of his employer. However, there's a decent chance they are, so check with them if you really want to know.

But really... do you need that kind of validation? Are the opinions expressed here in doubt?

MiscLinks