I'm using Apache Solr for my search , by using this i'm indexing number of assets for example (PDF,MS Word document).
If let the user giving the query like "PDF: java" i quickly really wants to search just the PDF files
Well, like I said. Setup a filetype[string] inside your schema and hang it whenever you upload that file.
so when you search
http://localhost:8983/solr/select?q=text:electrical design AND filetype:pdf
Quick hack: in case your documents are recognized by filename, you are able to tell Solr to limit leads to individuals ending in *.pdf by
http://localhost:8983/solr/select?q=text:electrical design AND id:*.pdf