Showing posts with label searching. Show all posts
Showing posts with label searching. Show all posts

Thursday, March 22, 2012

arabic and hebrew search

am having a problem in searching the database which contains arabic and hebrew text, while the english search works just fine, the arabic and hebrew always return no match. the data is stored and utf-8 the website is atwww.allforpeace.org .

is their a way to encode the text or what ever ...!! i need help

can u provide some code plz

Regards

|||

Hi,

If you're searching with parameters, make sure that the parameter type is NVarChar or NChar which accepts unicode. Or the search will not return good results.

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

Sunday, February 19, 2012

append xml nodes

I'm searching for a way to insert nodes from an xml document into an other.
My solution to the problem is something like this:
ALTER PROCEDURE [dbo].[insertOrder]
@.Customer xml (dbo.schemaCustomer),
@.Product xml (dbo.schemaProduct)
AS
BEGIN
declare @.app varchar(1024)
declare @.x xml
set @.app = '<Order><Product>' + CAST(@.Product as varchar(1024)) +
'</Product>'+ CAST(@.Customer as varchar(1024)) +
'<id_order>0</id_order></Order>'
insert into xOrder (doc) values (@.app)
END
but I think there's a better way to solve the problem.
Is it possible to do this witout any casting operation?
Thank you, Luca.Hello luca,

> I'm searching for a way to insert nodes from an xml document into an
> other. My solution to the problem is something like this:
> ALTER PROCEDURE [dbo].[insertOrder]
> @.Customer xml (dbo.schemaCustomer),
> @.Product xml (dbo.schemaProduct)
> AS
> BEGIN
> declare @.app varchar(1024)
> declare @.x xml
> set @.app = '<Order><Product>' + CAST(@.Product as varchar(1024)) +
> '</Product>'+ CAST(@.Customer as varchar(1024)) +
> '<id_order>0</id_order></Order>'
> insert into xOrder (doc) values (@.app)
> END
> but I think there's a better way to solve the problem. Is it possible
> to do this witout any casting operation? Thank you, Luca.
Not that I've found. Something like this would be ideal if doc was XML-typed
as X1 is here:
declare @.x1 xml,@.x2 xml
set @.x1 = '<pet id="1" ownerID="1"><name>Jack</name></pet>'
set @.x2 = '<descr>Grey<descr>'
set @.x1.modify('insert sql:variable("@.x2") into /pet[1]')
However, the modify method won't work with XML-type variables. Nor does trea
ting
@.x2 as a varchar(x) really get you any place since when you do try that,
you get:
XQuery [modify()]: Only non-document nodes can be inserted. Found "xs:string
?".
.modify() also requires the use of string literal as the query. So, Ick.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/|||Try:
CREATE TABLE xOrder(doc xml)
go
CREATE PROCEDURE [dbo].[insertOrder]
@.Customer xml, --(dbo.schemaCustomer),
@.Product xml --(dbo.schemaProduct)
AS
BEGIN
insert into xOrder (doc) select (
select @.Customer, @.Product as "Product", 0 as "id_order"
FOR XML PATH('Order'), TYPE
)
END
go
exec insertOrder '<a/>', '<b/>'
select * from xOrder
Best regards
Michael
"luca" <luca@.discussions.microsoft.com> wrote in message
news:1F06F5E3-E9C9-4B40-ACFE-2784345D1F40@.microsoft.com...
> I'm searching for a way to insert nodes from an xml document into an
> other.
> My solution to the problem is something like this:
> ALTER PROCEDURE [dbo].[insertOrder]
> @.Customer xml (dbo.schemaCustomer),
> @.Product xml (dbo.schemaProduct)
> AS
> BEGIN
> declare @.app varchar(1024)
> declare @.x xml
> set @.app = '<Order><Product>' + CAST(@.Product as varchar(1024)) +
> '</Product>'+ CAST(@.Customer as varchar(1024)) +
> '<id_order>0</id_order></Order>'
> insert into xOrder (doc) values (@.app)
>
> END
> but I think there's a better way to solve the problem.
> Is it possible to do this witout any casting operation?
> Thank you, Luca.
>

append xml nodes

I'm searching for a way to insert nodes from an xml document into an other.
My solution to the problem is something like this:
ALTER PROCEDURE [dbo].[insertOrder]
@.Customer xml (dbo.schemaCustomer),
@.Product xml (dbo.schemaProduct)
AS
BEGIN
declare @.app varchar(1024)
declare @.x xml
set @.app = '<Order><Product>' + CAST(@.Product as varchar(1024)) +
'</Product>'+ CAST(@.Customer as varchar(1024)) +
'<id_order>0</id_order></Order>'
insert into xOrder (doc) values (@.app)
END
but I think there's a better way to solve the problem.
Is it possible to do this witout any casting operation?
Thank you, Luca.
Hello luca,

> I'm searching for a way to insert nodes from an xml document into an
> other. My solution to the problem is something like this:
> ALTER PROCEDURE [dbo].[insertOrder]
> @.Customer xml (dbo.schemaCustomer),
> @.Product xml (dbo.schemaProduct)
> AS
> BEGIN
> declare @.app varchar(1024)
> declare @.x xml
> set @.app = '<Order><Product>' + CAST(@.Product as varchar(1024)) +
> '</Product>'+ CAST(@.Customer as varchar(1024)) +
> '<id_order>0</id_order></Order>'
> insert into xOrder (doc) values (@.app)
> END
> but I think there's a better way to solve the problem. Is it possible
> to do this witout any casting operation? Thank you, Luca.
Not that I've found. Something like this would be ideal if doc was XML-typed
as X1 is here:
declare @.x1 xml,@.x2 xml
set @.x1 = '<pet id="1" ownerID="1"><name>Jack</name></pet>'
set @.x2 = '<descr>Grey<descr>'
set @.x1.modify('insert sql:variable("@.x2") into /pet[1]')
However, the modify method won't work with XML-type variables. Nor does treating
@.x2 as a varchar(x) really get you any place since when you do try that,
you get:
XQuery [modify()]: Only non-document nodes can be inserted. Found "xs:string
?".
..modify() also requires the use of string literal as the query. So, Ick.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
|||Try:
CREATE TABLE xOrder(doc xml)
go
CREATE PROCEDURE [dbo].[insertOrder]
@.Customer xml, --(dbo.schemaCustomer),
@.Product xml --(dbo.schemaProduct)
AS
BEGIN
insert into xOrder (doc) select (
select @.Customer, @.Product as "Product", 0 as "id_order"
FOR XML PATH('Order'), TYPE
)
END
go
exec insertOrder '<a/>', '<b/>'
select * from xOrder
Best regards
Michael
"luca" <luca@.discussions.microsoft.com> wrote in message
news:1F06F5E3-E9C9-4B40-ACFE-2784345D1F40@.microsoft.com...
> I'm searching for a way to insert nodes from an xml document into an
> other.
> My solution to the problem is something like this:
> ALTER PROCEDURE [dbo].[insertOrder]
> @.Customer xml (dbo.schemaCustomer),
> @.Product xml (dbo.schemaProduct)
> AS
> BEGIN
> declare @.app varchar(1024)
> declare @.x xml
> set @.app = '<Order><Product>' + CAST(@.Product as varchar(1024)) +
> '</Product>'+ CAST(@.Customer as varchar(1024)) +
> '<id_order>0</id_order></Order>'
> insert into xOrder (doc) values (@.app)
>
> END
> but I think there's a better way to solve the problem.
> Is it possible to do this witout any casting operation?
> Thank you, Luca.
>

Thursday, February 9, 2012

Anything new to expect with SQL Fulltext searching?

would love to see improved proximity searching, specifically the ability to find terms within x number of words of another term.

thanks-
And I'm throwing in a bit more: How about the support for various languages? Will more languages be supported?|||And how about access to the Full Text index for term frequencies?|||

Hi Andrew,

we have lots of news in the next FTS. Unfortunately, the ability to specify x number of words in NEAR is not yet sure whether it is going to make it on time for the release or not. We are aware of its importancy and working on it as we can, however, there are timelines and schedules we can not move as we would want. Be sure we will try hard to push this feature into our next release. If nto possible by then, be sure it will be in the top 5 features we address immediatelly after.

Thanks.

|||Yes. The nest FTS will include a wider range of supported languages out of the box. We are currently working on the integration of >40 new word breakers (languages). If everything goes as we expect, the next SQL Server release will have a significantly improved language coverage story in FTS.|||Yes. Our next FTS release will provide tools to access the raw data of the FTIndex by Administrators only. These tools will allow you to see the content of the FTIndex and all its metadata associated. This will be extremely useful to find answers or problems associated with your Search application. Frequency of terms will be part of the results returned by these new tools (DMVs).|||

Are the new DMVs in the current June CTP or are you saying they will be in one of the upcoming 2008 CTPs? I'm very interested in this capability for use in data mining, implementation of semantic search, etc.. On that note, are there any plans for your team to address semantic search?

|||

The new improved FTS capabilities are coming in a future CTP. As to semantic search: We are looking into semantic search capabilities, but for 2008 we only provide you the thesaurus support that is available already in SQL Server 2005 (which some improved manageability).

Best regards

Michael

|||Really excited about the inclusion new FTS features in SQL Server 2008. Did the "abililty to specify x number of words NEAR" make it into the latest beta? If not, do you think it will it be in the full version release? I am working on a project that requires this feature and am hopeful that it will become available soon.

Anything new to expect with SQL Fulltext searching?

would love to see improved proximity searching, specifically the ability to find terms within x number of words of another term.

thanks-
And I'm throwing in a bit more: How about the support for various languages? Will more languages be supported?|||And how about access to the Full Text index for term frequencies?|||

Hi Andrew,

we have lots of news in the next FTS. Unfortunately, the ability to specify x number of words in NEAR is not yet sure whether it is going to make it on time for the release or not. We are aware of its importancy and working on it as we can, however, there are timelines and schedules we can not move as we would want. Be sure we will try hard to push this feature into our next release. If nto possible by then, be sure it will be in the top 5 features we address immediatelly after.

Thanks.

|||Yes. The nest FTS will include a wider range of supported languages out of the box. We are currently working on the integration of >40 new word breakers (languages). If everything goes as we expect, the next SQL Server release will have a significantly improved language coverage story in FTS.|||Yes. Our next FTS release will provide tools to access the raw data of the FTIndex by Administrators only. These tools will allow you to see the content of the FTIndex and all its metadata associated. This will be extremely useful to find answers or problems associated with your Search application. Frequency of terms will be part of the results returned by these new tools (DMVs).|||

Are the new DMVs in the current June CTP or are you saying they will be in one of the upcoming 2008 CTPs? I'm very interested in this capability for use in data mining, implementation of semantic search, etc.. On that note, are there any plans for your team to address semantic search?

|||

The new improved FTS capabilities are coming in a future CTP. As to semantic search: We are looking into semantic search capabilities, but for 2008 we only provide you the thesaurus support that is available already in SQL Server 2005 (which some improved manageability).

Best regards

Michael

|||Really excited about the inclusion new FTS features in SQL Server 2008. Did the "abililty to specify x number of words NEAR" make it into the latest beta? If not, do you think it will it be in the full version release? I am working on a project that requires this feature and am hopeful that it will become available soon.