How do I find the field in which the match has been found? - lucene.net

In my application I want to know which field of the Document has been matched during search.
So I opted for searcher.explain(). However later I found out that this is a costly approach.
As an alternative I pondered in contrib dlls and saw FastVectorHighlighter class having IsFieldMatch() api. But there is no documentation available stating if this can be used without any performance constraint.
So kindly let me know which is better searcher.explain() or FastVectorHighlighter.IsFieldMatch()
It will also be great if you people suggest me any alternative approach as well.

Related

Is there a user-friendly interface I can type MongoDB queries at?

I am new to MongoDB, but have gone pretty far with studying some of the fundamentals. So far, I have been using the mongo shell to write my queries. I was wondering if anyone here can introduce me to a simple and straightforward user-friendly interface I can use to type out my queries.
I have examined Studio3T and Robo3T. Both do not really meet my requirements as they are too heavy and full of menus I don't need at the moment. I am tempted to go on a wild search and download spree, but I figured some help here might be a better approach.
I need it to be the following:
-Simple and lightweight
-Completes curly and square brackets
-May or may not offer error checks while writing queries
-May or may not offer auto-complete of keywords.
I'd really appreciate any pointers. Thanks

What are the basic important things that will be needed to develop an application with ionic2 including Mongodb?

I have been previously learning, how to make applications with ionic2, Angular2 --> For Frontend.
And backend--> Firebase.
Now I have to change my backend to MongoDB.So, What all important things I should learn in order to use MongoDB?Please suggest.
Thank you.
Note: Please let me know if any more inputs are needed relating to this.
You can learn following to accomplish a decent backend with mongodb :
Learn mongodb with some latest aggregation features to make sure the your queries are optimized. mongodb has great documentation which can help you. Install mongo shell and play around to get hands on it.
Make sure your have good cluster-replica management to make sure your data is backed up properly.
Extremely important, make sure you add indexes on the fields which you find are reference points for majority of your queries. Trust me, adding a simple index to a commonly referenced field makes a huge difference. Also, just as an addon, check what type of index you would need based on your requirement. There are various available in mongodb documentation.
Make sure you structure your collections in such a way that there are not many $looups(inner joins) however still making sure how you can keep it scalable. It totally depends on your application schema though.
Try hands on Mongodb Map-Reduce as its very handy.
Install RoboMongo, a GUI client for mongodb if you are used to stuff like phpmyadmin.
Node js(optional if required) :
1. Learn express which is really easy. It will help you to get started with basic routing, cors handling , middlewares and such http-web related stuff.
2. Mongoose, which is a mongodb package for node. There are many others, however if you are familiar with ORM then mongoose is really handy to get you going with simple steps.
3. Authentication for RESTful APIs : There are many options available to be honest. However, based on my experience, you can use passport-jwt, which is really simple and effective.

Autocomplete with Natural language

My project needs some natural language processing. I'm completely new to the field.
what I'm trying to achieve is that when the User enter the description of the product I look for in my database which description is nearest and suggest that the category, product group and sub-group (the tree of the product).
For this titles 250 extracts products for each subgroup.
What is the specific term in NLP for doing this? I tried googling for a while, but had no luck since I don't know the term. Any good tutorials to start with? Are there any good libraries in doing this specific task?
Thank you.
From what I can tell autocomplete or text prediction/predictive search isn't really a big research area in NLP. It wasn't even covered in any of my graduate level classes and I do research in this area. I think the reason is that there are solutions that exist which are good enough for the vast majority of real world problems.
I'm not sure which language you work in, but the library you want to work with is probably Lucene if you are dealing with java, perhaps setting up a Solr instance if this is a general problem for you and you are dealing with a large number of ontologies.
You can find some reason tutorials/examples here on stack overflow, such as:
How to implements auto suggest using Lucene's new AnalyzingInfixSuggester API?

Best way of documenting mapping to different venues

Hi I have been asked by my employer to document how our FIX Spec will map to another venues FiX Spec.
This will require hard work as it involves going through each message and seeing how it is different to ours. What is the best way of documenting this? Is there any software that will make this task easier?
If you are using QuickFIX I would say to have your custom FIX dictionary in the XML format, you can use the default one for FIX 4.2, 4.4, etc and change accordingly to your needs
http://sourceforge.net/p/quickfixj/code/1113/tree/trunk/core/src/main/resources/
Then you can generate Java code for example with QuickFIX/J Code Generation and write unit tests to check if you still comply with your FIX Spec
http://www.quickfixj.org/quickfixj/usermanual/1.5.3/usage/codegen.html

Vork PHP framework

Has anyone used Vork? What has been your experience?
How does it compare to f3 or lithium? I'm building with MongoDB.
Which one performs better?
Due to lack of popularity and the license which is unsuitable for libraries you won't find many users of this framework. So I'll give you a placeholder answer. The performance comparison is out of scope here, and could not be objective or meaningful anyway.
I have no clue about MongoDB (their website is pretty slow, which indicates no immediate benefit of researching it further). But I've glanced over Vork:
In comparison to other frameworks it seems a bit disorganized. The naming of include files sans extension is quite unique and actually charming. But the class and directory structure isn't.
It follows the Pretend-MVC fallacy.
But my biggest concern is that it encourages oldschool SQL concatenation and escaping (and the naming of said escape function looks dated).
The templating API looks interesting, but I did not research that much. (API usability is the crucial part of frameworks, not performance.)
Website doesn't appear very inviting, and this impacts the documentation (which isn't quite complete.)
On the upside, it comes with a lot of utility code. So if you find an intersection of features that you need, then that's a reason to try it out.