Please format your code using </> icon. It will make your post more readable.
You need to understand how all this works.
By default, when you index hello world, you basically create 2 entries in the inverted index: hello, world.
You can of course use phrase search for your first question.
For the second question, I'd really recommend not using any wildcard query but better index your data as you will query them.
Typically using ngrams, you can index here something like hel, ell, llo, hell, elloand hello. Then searching for llo will match.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.