Why my search result not showing when I input any body text ?

Are search results based on node title only?

I am creating a multilingual site with French and English languages.

Users should be able to search results by entering any text of a node whether its body text, taxonomy, subtitle and so on.

  • 1
    perhaps your node is not indexed yet ? – GiorgosK Aug 30 '18 at 7:19
  • how to index nodes i am using core seach module ,in drupal 7 i have never faced such issue – user52318 Aug 30 '18 at 7:23
  • Is cron running ? search is indexing content on each cron run. check your admin/config/search/settings admin page it tells you what percentage of your nodes is INDEXED. Run cron a few times manually to index the rest of the nodes if not completely indexed all nodes. – GiorgosK Aug 30 '18 at 7:26
  • its showing showing 0 node has been indexed ,i clicked on the reindex but still its showing 0 node indexed – user52318 Aug 30 '18 at 7:29
  • Run cron manually to index the nodes. But ideally set a cronjob to do this automatically. – GiorgosK Aug 30 '18 at 7:30

Core search indexes titles and body content but in order to actually be able to search the nodes have to be indexed.

Search indexes nodes on batches and each batch starts on a cron run. You can run cron manually by going to your /admin/reports/status but ideally you want to setup a cronjob to do this for you automatically.

Search admin page (admin/config/search/pages) reports on what percentage of the nodes have been indexed.

Only after the search admin page says you have 100% of the nodes indexed you can be sure that what you search can be found.

  • 100 % nodes indexed,still its not searching result – user52318 Aug 30 '18 at 7:50
  • One thing you missed ,you need to enable view mode(ie.search index) in manage display of the content type, enable those fields(like body,title,taxonomy) which you need to index in that view mode,kindly include this line in your answer. – user52318 Aug 30 '18 at 12:35
  • Actually in a new drupal installation just installing the core search does not need anything else to work (just tested it again) ... perhaps you have a custom/contrib module that is overriding search functionality ? – GiorgosK Aug 30 '18 at 17:05
  • Yes, indexed is the rendered output of the view mode search_index which has the body included by default. If not check the Manage Display tab of the content type. – 4k4 Aug 31 '18 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy