Showing posts with label Autonomy. Show all posts
Showing posts with label Autonomy. Show all posts

Wednesday, July 9, 2014

IDOL To Solr Migration Lessons Learned - Part 4 Stuff I miss about IDOL



There is going to be much more good info on Solr coming up, especially next week's post which will cover our process for relevance tuning and things we learned. But, in the mean time I wanted to take a stroll down memory lane and mention some of the things I miss about IDOL. These items, although not major, still come up to haunt me now as well as during the deployment. Oh, and I promise, I am not getting any money from HP for this. 

Let’s start off with an easy one; documentation. When you buy IDOL, you get a plethora of manuals, so much, in fact, that you could club a baby seal to death with them. There is a getting started guide, to ease you into IDOL, Server Admin documentation as well as much reference material that will provide you everything you need to know about every single type of call you can make to IDOL. It seems intimidating at first, but it is truly priceless. It is up to date, consistent and informative.

With Solr, we were pretty much at the mercy of online forums, some blog posts and the wiki pages. The wiki pages provided some good information, but some areas definitely need improvement. Some parameters only had a sentence or a few words of a description which drove me nuts. Forums support was good, but then again, you have to provide quite a bit of information about what you are trying to do, reasons for which may be hidden in some old business requirements that don't always make sense. Naturally, that information has to be disclosed because the first ten replies will echo a message of “Well, whachya doing that for?”. 

We procured support for Solr and it came in handy, we couldn't have done it without those guys. However, at times I found myself reaching out to them with a question for which there was a very valid answer that was not documented anywhere. A bit frustrating, but something workable.

Another thing is logging. In IDOL, there are several distinct logs that are written out, they are marvelous, and they tell me exactly what it is doing. There is one for queries, there is another one for the application, another for indexing, and a few others and they are all neat, informative and concise, plus I can tune logging detail per type of log.

With Solr, there are several loggin modules that can be configured to your liking and log level for different kinds of items is very adjustable, however I failed to find a good balance between the right information and log volume. Maybe, I need to spend a bit more time on it, but this process is much simpler in IDOL.
Aside from general log upkeep, there is another point of IDOL that I terribly miss. IDOL logs tell you exactly what is happening. With Solr, I found it to be much much more obscure. For example, if the core is performing some internal indexing operation, there is absolutely no status reporting, it’s the equivalent of kicking off an action and just waiting … log file equivalent of those old school Windows hourglass that just spun around and round. If indexing actions weren't bad enough, wait until a core goes down, recovery kicks in and the customer asks you how long it will take.

I also miss some of IDOL’s terms functionality, when I first started working with IDOL, I read the sales material and thought to myself.. “yea, right….”. Years of sweating (or shivering) in server rooms and having to deliver on sale’s people’s imagination made me a natural skeptic when it comes to these kinds of claims.

However, after a while, I was able to validate these claims of conceptual understanding myself. With IDOL, you are able to scan a piece of text for the best terms that represent it in comparison to other documents in the index. It sounds like TF-IDF, but it is much much more than that. I am not sure how it works, but it came in handy when I was trying to group similar types of content together.


While we are talking about terms, I think I should mention IDOL stemming which works better than Porter and Snowball. In my book, they either do too much or not enough. IDOL’s stemming is still the best I’ve seen. 

The last and very important point is that there are few relevance configurations that I miss.  First of all, in IDOL document scores in the results are relative. In Solr, they are not because of QueryNorm, in Solr you can't perform any kind of meaningful comparison between two sets of results. IDOL does this, with IDOL you can run multiple queries and compare the scores of the results with each other. Now, I know what you are thinking... Why would anyone want to do that? Well, when it comes down to grouping related content to finding conceptually similar stuff this is really important.

Sorry for the trip down memory lane, just couldn’t resist it. There are a few other items on my wishlist for Solr, I will cover them in the next posts. I hope you guys are getting some value from this, leave a comment or two to let me know what you think.

Thursday, July 3, 2014

IDOL To Solr Migration Lessons Learned - Part 3 Data Processing



This post is a quick follow up to the last one in which I discussed several differences between IDOL and Solr when it comes to indexing data. In this post we will explore how different products maintain the data and what they allow you to do with it.

With IDOL were able to set certain fields for various searches, such as IndexFields for text indexing, or parametric for other types of searches. Any kind of data massaging had to happen before indexing to IDOL; via custom development or a Lua script in CFS. This certainly got the job done, but it didn’t even come close to the flexibility that Solr offers. With Solr, we customized processing for each field using Solr’s built in analyzers and tokenizes. This treats each field independently and tokenize (create individual searchable elements) by field. After tokenization, we run several analyzers on fields. Analyzers allow you to massage the data a bit before it is indexed; things like stemming, synonyms, minimum token length filtering occurs at this stem.

For example, we have a filed for manufacturer part number, the data comes in a variety of different formats and no single rule would accommodate all manufacturers and their favorite preference for part number formats. However, we were able to take it up a notch, but using the Word Delimiter Filter (Analyzer) to massage a bit each token in the manufacturer part number field. The word delimiter filter is configured to break up a token at transition from numeric to characters and vice versa. This breaks up patters such as FLV12345X, then, the length filter is applied to filter out anything less than two characters, so this field would be indexed as FLV12345X (original term is kept), FLV and 12345.  If a user searches for a part number as it is indexed, there will be a hit on three terms in one field, all of these terms should hit. Since the field is weighted highly, that almost guarantees that the product will be displayed. This came in handy, since we don’t have control over our data and get even the same part numbers in different formats from each vendor.

An even cool part, is that you can specify two sets of processes for each field, index and query level processing. This allows you to run a specific process on data when you are indexing it, and then a slightly different process when you are querying it. This came in handy for synonyms as we didn’t want to expand the query to contain synonyms, since some of them are abbreviations and they could dilute the search results, so instead we just included them at index time and indexed a few extra terms for each picked up synonym.

Solr’s list of tokenizes and analyzers can be found here: https://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters

Don’t worry if the list looks intimidating at first, Solr’s admin interface lets you test how various strings will look like with different field configurations. This allows you to easily test any field level processing without having to drum up some dummy content, index it, and then search for it until you figure out what is what. The Analyzer tab in Solr UI lets you see exactly what will happen with your data when you index it.

To sum up and keep it short: Solr is definitely a winner in this category. IDOL has some other cool functionality, especially when dealing with conceptual understanding of various terms, but it's not the same as this awesomeness of Solr field level processing.

I hope you found this post informative, I think that field processing is by far the coolest thing about Solr; but there are several others that are pretty close behind it. If you liked this post and want to get future posts by me, remember to sign up in the top right.

Wednesday, June 25, 2014

IDOL To Solr Migration Lessons Learned - Part 2 Indexing Data


Since the data we were indexing into IDOL was plain old XML and we had a rather custom rig for indexing content we were easily able to modify it to generate some JSON files in a format that Solr understands. The only tweak we had to make is flatten our data structure since Solr didn't supported nested elements like IDOL. All in all, not a big loss and in retrospect this kind of simplified things. However, the fact that it wasn't supported was kind of odd at first. Lets examine how both products index content and some of my favorite things about each one.

In IDOL world, we index content through the DIH that distributes the data, then each content engine indexes the data and it sits in the queue until the content engine performs a DRESYNC operation to commit it to the index. The search performance drag of DRESYNC was unacceptable in regular production operation. It would take forever and searches would slow down to a crawl. However, since we had a mirrored set-up, we could easily mark one of the content servers offline at the DAH (where queries come from), DRESYNC it while it’s counterpart responds to searches, then bring it up and perform the same operation on the other content engine. Other maintenance activities like DRECOMPACT were executed in a similar manner, naturally it was all automated and didn’t give us much trouble.

IDOL is generally used index unstructured content; binary documents such as PDF, MS-Word, Excel, HTML, etc... Through processing it will extract all document level metadata and content and index it in IDOL. Additionally, indexing is a distributed process, the server does not do ALL the heavy lifting. Generally, a repository specific connector (there is about 400 of them) will pick up the file and send it to Content Framework Server (CFS). CFS will process the document and run things like, text extraction, pre/post processing tasks, custom Lua scripts to massage the data and etc... Once everything is complete, it will send the data to IDOL for final indexing. As soon as IDOL receives the file, client's (CFSs) job is done and it is freed back into the wild for additional index tasks, even if the file is not indexed yet. IDOL then would index the content, but not commit it to the index until DRESYNC is ran.

With Solr, we were pleasantly surprised since the indexing and committing operations did not drag down the search performance, indexing was also a lot faster than IDOL. We used a very aggressive soft and hard commit policy that would commit all content within a few seconds of indexing. With Solr we no longer required this maintenance policy and can index content throughout the day without noticeably impacting performance. This allowed us to process large quantities of updates and changes during the day if there was a large backlog. 

The way solr commits the data to the index is pretty cool. In a nutshell, it will open a new segment of the index and write data to it without impacting the existing index. The frequency of writing indexed data from memory to disk is controlled by the hard commit interval. The frequency of committing data to the search index and making it searchable is a soft commit.  We were able to get optimal performance with 15 second hard commits and 5 minute soft commits. Once the soft commit is triggered, Solr will do whatever it needs to do with the data and open a new Searcher process that will be able to search the entire index, old segments and the new data that was indexed. Since the data indexing is not directly modifying the searcher process, search requests are not impacted by indexing. 
Where IDOL Wins:
When a Solr client POSTs files to the server, the indexing begins immediately, while the client connection is still open. This is not something I particularly like and I think this is one of the things that IDOL got right, with IDOL you are able to send all the data to the server and let it process the data when convenient. This frees up the client for additional work.

Additionally, IDOL allows you to configure multiple connector and CFS instances to distribute the indexing load across many systems. This is critical for some of the larger implementations where you are dealing with several terabytes of data, and indexing all data can take weeks or months.

Another win for IDOL is the amount of custom development required to index data. With IDOL, you can deploy, install and start indexing without any custom development, right out of the box. With Solr, you will need to write something to format the data in specific JSON format and send it to Solr for indexing. Additionally, Apache Tika provides a text extraction library that can extract text from binary formats and include it with your content. After this, you only need to develop something that crawls a repository or a filesystem location for new/changed files and indexes it into Solr.

Where Solr Wins:
Solr scores a few points in this category. First of all, indexing was a lot faster than IDOL, indexing all of our data took approximately 6 hours in IDOL, while with Solr we were able to cut that time down to about 4 hours.

Second, the index disk sizes were a lot smaller, somewhere in the range of 60% of what IDOL had to use.

Third, and I will mention this more later, Solr provides a lot of flexibility with data processing through different tokenizers and analyzers.

As always, I try to not play favorites here, I truly believe each product does what it does extremely well and depending on your specific requirements, one may work better than the other. Stay tuned, in the next post I will explore what each product allows you to do with the data once it is indexed.