Apache Solr is an search platform that runs on Servlet containers (such as Jetty, Tomcat) and uses Apache Lucene for indexing, so they are not the same thing.
You can think of Solr as more of a product or a ready to use system and Lucene as an engine/framework.
If you're looking to do indexing within your JavaFX application then you should stick to Apache Lucene, if you're considering a server-side approach to searching and indexing Solr could be an interesting idea.
You can check up more info and comparisons on Lucene and Apache at the following pages:
Lucene vs Solr
http://lucene.apache.org/solr/
Difference between solr and lucene