Lucene Interview Questions [closed] - java

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am interviewing candidates for a position developing an application which relies heavily on Lucene. In addition to the usual questions I ask, I'd like to be able to ask one or two Lucene-specific questions that will give me a rough idea of how familiar they are with the library. The problem is that I have no experience with Lucene myself. Any suggestions?

A couple of questions I would ask:
What is the Lucene data structure? (inverted index)
How does Lucene computes the relevancy of a document? (vector space model, boolean model)
What is a segment? (a portion of the index)
How text is being indexed? (analyzers, tokenizers)
What is a document? (collection of fields)
What is the Lucene query syntax looks like? (boolean query, boost, fuzzy searches)
How it differs from a relational database and when would you use one over the other?

This is a tricky task. You're looking for the guy who knows more about Lucene than you do; therefore, you can't be a reliable judge of the candidates' knowledge (although you should be able to at least eliminate the ones who obviously know less than you).
My advice is to ask the candidates to explain to you some aspect of Lucene that you are confused about. When the interview's over, you can look it up to see if the answer made sense. This has the added benefit of testing their ability to communicate complex ideas. (And if the answer is "I don't know", then you should take that as a good sign: people who are willing to admit their ignorance are worth a lot more than those who aren't.)

If the candidate has a long history of Java development, familiarity with the Lucene API shouldn't be that important. Someone unfamiliar with Lucene might take a little longer to get started, but in the long run, I would feel much more comfortable with a Very experienced Java developer than a somewhat experienced java Developer with Lucene experience. In fact, I might prefer a very experienced non-java programmer if there portfolio was impressive.

Related

Full-Text-Search of database [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Iam looking for a performant way and readable way to implement a full-text-search. I have a lot of requirements for the serach. See this list below.
Requirements
Peformance
My database growing up very fast. Load all data into HEAP an doing some .stream()-magic is not an option. The search should be performed by the DBMS.
Readability
I need easy a solution. A complex query like this How to implement simple full text search in JPA (Spring Data JPA)? (see option #2) is also not a solution. I would need some JOINs and the resulting query is to complex.
The overhead with an "index-field" is also not possible (to much joined data).
Concurrency
The application need to be scalable (with n-instances), so a solution with Lucene is not very good here is an example
no mixing of technologies
I dont want to mix the logic into different systems. This means, the whole search-logic should be defined in Java. A combination of the Java-Logic with views or sql-functions should be avoided.
Discovered options yet
QueryDsl
This is my old solution. But its very complex and produced a lot of problems with the automated generated classes.
Lucence
I like this. But there only one big problem: The index. Keep the index up2date on all instances is going a bit too overkill.
Very long #Query
The resulting query getting to complex to handle it.
Java.stream()...
// kinda
getAllUsers().stream()
.filter(user -> user.getName().contains(searchTerm)
|| user.getSex().contains(searchTerm)
|| user.getAge().toString().equals(searchTerm)
|| ...)
I have to much data to do that. So this solution will also not scale well.
Specification Interface
My preferred solution. But maybe there are other (and better) solutions?
SearchFiled or similar
Too many JOINS. Too much data.
?
Question
What are your expericenes with full-text-search in a Spring-Boot-Application? Do you know a solution that met my requierements?
If you have reached till Lucene, then a step further is Solr. I haven't used the options you have mentioned above, but I have certainly worked with Solr and can safely say that it is worth a try, for speed and ease of use.
Out of the four constraints you have put, the first three are taken care of, I feel with Solr.
Performance: Solr is a proven candidate in this area.
Readability: I assume you mean readability of code. Though this depends upon the code and design are done, the Solr part is quite friendly to code, understand and maintain because of the lack of JOIN and other RDBMS concepts.
Concurrency: From the official documentation at lucene.apache.org/solr:
Both Lucene and Solr were designed to scale to support large implementations with minimal custom coding.
and that Solr can do the following in this regard:
distributing an index across multiple servers
replicating an index on multiple servers
merging indexes
no mixing of technologies: With the option of using Solr, you have at least two technologies: Java and Solr. I am not sure if you wanted to keep your solution to pure Java/JEE. If that is the case, then this may not satisfy that need.
However, this requirement:
The search should be performed by the DBMS.
is surely not taken care of.
Also, can't think of a way other than a custom design for this:
Keep the index up2date on all instances is a bit overkill.
A warning: It may take some time to get a good grasp on Solr if you are new to it.
you may consider apache solr for searching

Self teaching professional java skills [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've been programming in java for a while and I really like the language, I've mostly just done game programming, but I want to get a feel for some of the more commonly used api's and frameworks and just get a generally more well-rounded grasp of the language and the common libraries in the current job market.
From what I found things like spring, hibernate, and GWT are pretty in demand right now. I looked at some tutorials online and they weren't hard to follow but I really felt like I had no context for what I was learning - I had no idea how any of it would be use in a real work environment. I know nothing can rival the benefit I'd get from actual work experience but that's not an option for me right now, I need another way to learn these technologies in a way where I'll at least feel comfortable working with them and know what I'm doing beyond just understanding what code does what. I checked out a few books but they were all really old(like pre-2006, am I right to assume those books would be kind of out of date today?) or required experience with libraries that I didn't have and can't get. I hate getting stuck looking for the best resource to learn something instead of spending my time actually learning.
All I really want is someone to point me to a resource(website or ebook) that is aimed at already experienced java developers and will not only teach me some interesting useful java technology(anything that is useful, I dont know much outside of graphics libraries and game related things so I was thinking some database or web programming api's) but also give me a good perspective of it and leave me feeling confident that I could actually use what I learned on a practical application.
If my post makes you think I'm not yet experienced to be learning these things, which I doubted earlier today but am now starting to question, then what do you think is the next step for me? I just want to get better at java.
Thanks everyone
Register to the online courses at www.javapassion.com. It is cheap for the content and quality they offer.
The best way to learn is by doing. So I would recommend you to either start a private project which uses the technologies you want to learn or to find an open source project which uses them and contribute to that. The latter option has the advantage that you get feedback from other programmers, but the disadvantage that it leaves less room for experimentation.

How to get interest in programming especially in java and android [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am new in this community. I just completed my Btech in Computer science, I have interest towards programming especially java. I started studying java but i am little bit slow in logic and understanding the concepts. I have some good books of java but when doing the program i am losing my confidence because of the logic issues. I have some doubts
How can i improve my logical and coding skills
HOw to get real interest in programming.
Is there any shortcut for studying programming
Please provide some suggestions as i knew this forum has lots of good programmers. Please share ur thoughts and how you people improving ur logics.
Any help is appreciated
Perfect way is to start with the language you love. The syntax you like. The things you know. For example, suppose you know C++ and you are a bit familiar with it. Of course, you had done any of the language before in BTECH. So, go start up with that. Go through some basics of that to intermediate. And, if you're new to programming, then don't jump towards deep nor visit the Forum's guide post until you face the same problem. Make simple programs. Ask experts for your problems and when you feels yeah I learnt so much from my self and community, start digging the complex scenerios of that language. (Here, language can be any programming. For your case, Java)
Whenever you got perfect in your own loving language, it would be easy for you to switch any of the language because all languages are same probably. Mostly, some syntax changes and some component, feature or etc changes.
Write code. Read code. Study code. Breath code.
If you aren't interested already then (1) will be a bit hard
No, you just have to put the time in and do it
At the end of the day, the real way to become a better programmer it to use your tools more and to research proper methods of using those tools. There are no short cuts, there is no go direct to go and collect $200.
As for interest in coding. I find that my interest for various projects waxes and wanes but at the end of the day, I still have a voracious apatite for solving problems and writing code. I don't know if that can be learned.
1) By practice and even more practicing.
2) Don't you have an interest you can combine this with? It's hard to find a hobby that can't use any software.
3) If there is a shortcut it's probably no good.
4) Why do something you're not interested in?
first of all
*3. There is no shortcut
you have to be patience and passionate in order to learn coding.
*2. See thing in computer, and be curios how the engineers make things so easy and simple that any person can do much complex task in a seconds
and
*1. In order to improve your logic you need to keep coding, more you code more you get sharpen, solve puzzles, and maths problems, and to learn good coding style head first java and Head First Design Patterns is the best book that I found, which I personally love to read.

Reverse Engineering poorly documented Java from source [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm a systems engineer, recent college grad, and I've just been given a project that is exceptionally daunting.
We have a legacy system, we legally own the entire code and all rights to it. The problem is that the code is poorly documented, what little documentation is incomplete, sometimes wrong and the original devs are unavailable.
It uses a custom Perl build script requires a thousand modules from CPAN to work and I do not know Perl. Reverse engineering into UML has failed except with Doxygen and that is limited to just inheritance diagrams and call graphs.
I've obtained a massive chalkboard and I'm slowly trawling through the code, modeling packages and then the nested packages within.
My question is whether or not I'm approaching this reverse engineering from the right direction. I'm working close from the bottom trying to figure out what calls what while developing UML and writing a Design Document. I did a package diagram but it's hard to figure out what's going on at that high a level.
An academic paper I pulled up suggests I also make a new Requirements Document which would slow me down even more and I don't know if it's a good idea as the other developers are always busy trying to keep the legacy system up.
Are there any books out there that can help me and am I approaching this from the right angle? Should I hire a contract worker that knows Perl and JMX to assist me?
The book "Working Effectively with Legacy Code" by Michael Feathers will probably help you more than anything we can tell you here.
However, the most important thing you need to clarify for yourself (and from your question it sounds like it's not completely clear) is this: what is your goal? What do you want to achieve with this codebase?
If the answer is (as it sounds) "being able to effectively maintain the existing project", then trying to directly build a complete high-level model of the system may not be the most effective path. It's probably just too much at once to keep in mind.
In this case, I would try to understand only the use cases of the system that you currently need to modify; follow method calls through the code (pssibly using a debugger on the running system) to see what parts are involved. Do this for a few different use cases and you'll start to see patterns, then document those and gradually fit them together into a high-level image of the system.
This tool might assist you.
Or if the legacy system is written poorly it could just make a huge unreadable mess, but I hope it helps.
If it is a java code then a deep reverse engineering would be very helpful.
See a documentation at: http://www.ejb3.org/jar_file_reverse/jar_file_reverse.html

Java path to follow [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
I finished reading tutorials on Java and doing the sample exercises and I am ready to really get into coding Java, the only problem is I am a bit confused as to what I should do now. What path should I take at this point ? Should I join and start contributing to an open source project ? What suggestions would you give ? I'm not actually interested in something particular so anything will do.
For the more advanced programmers, try to put yourself in my position. What would you do now?
Contribution to OSS is definitively a good way to consider at some point, but I don't think that would be an easy task for someone who just started doing sample exercises.
For contributing to OSS, I suppose you would have to consider much more then a programming language, including:
SCMs - http://en.wikipedia.org/wiki/Revision_control,
File comparison is related - http://en.wikipedia.org/wiki/File_comparison
Software design patterns - http://en.wikipedia.org/wiki/Design_pattern_(computer_science),
Software testing - http://en.wikipedia.org/wiki/Software_testing,
Get familiar with Java libraries such as:
Apache Commons - http://commons.apache.org/,
Hibernate - http://www.hibernate.org/,
Spring Framework - http://www.springsource.org/
Documenting - http://en.wikipedia.org/wiki/Javadoc
Depending on the project you would like to get involved with, it would probably be wise to familiarize with some of these:
JDBC - http://en.wikipedia.org/wiki/Java_Database_Connectivity
JMS - http://en.wikipedia.org/wiki/Java_Message_Service
Swing - http://en.wikipedia.org/wiki/Swing_(Java)
JNDI - http://en.wikipedia.org/wiki/Java_Naming_and_Directory_Interface
JMX - http://en.wikipedia.org/wiki/Java_Management_Extensions
As you can see, it's a lot, so depending on what you want and what level you are at right now, I suppose it would be good for you to stick with some of the programming exercises such as:
Working on PLEAC Java - http://pleac.sourceforge.net/pleac_java/index.html
You may even be able to contribute to PLEAC
RubyQuiz - http://www.rubyquiz.com
Not Java, but problems are rather general, you can try solving them in Java
CodingBat - http://codingbat.com/java
Has some nice problems
Alioth - http://shootout.alioth.debian.org/
Very benchmark oriented, but can be interesting. Look at specific problems (e.g. http://shootout.alioth.debian.org/u32/performance.php?test=fasta#about) to see what is needed
When you pass through some of these and feel confident you can continue, I suggest learning some of the libraries, such as Spring.
Hope this helps. Most importantly - note there's always something you can do, whatever you do is better then not doing anything. It's going to keep you motivated and involved in things that you need to know. So learn, learn, learn... Best luck!
If I were you, I'd try to build some kind of data structure like a linked list or something of that nature. It causes you to understand the fundamentals of java and gives you a better understanding of the structure that you make also. Check out one of my old school labs to have some direction. http://www.mediafire.com/?dq1lmshdzage8xo
Try this for implementation example.

Categories

Resources