Nhib.pdf and full-text search

Source: Internet
Author: User

There seems to be no full-text retrieval statement for nhib.pdf. I usually use two methods.

1. icriteria, using expression. SQL

Icriteria CRI = This. session. dbsession. createcriteria (typeof (MAG. Article. lightnews ));
CRI. Add (expression. eq ("deleted", isdelete ));
CRI. Add (expression. SQL (string. Format ("contains (title, '{0}')", key )));

2. isqlquery

String SQL = string. Format ("select ID from [user] Where contains (loginname, '{0}')", pkey );
Isqlquery query = This. session. dbsession. createsqlquery (SQL );
Query. addscalar ("ID", nhibernateutil. int32 );
System. Collections. arraylist IDs = new system. Collections. arraylist ();
Query. List (IDS); // You can also query. List <entity. typename>. Of course, fields cannot be specified in SQL statements.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.